move package files to unique name (#3438)

This commit is contained in:
ebbit1q 2018-11-21 22:59:46 +01:00 committed by ctrlaltca
parent d9b11858fb
commit 3f40a51cdb
2 changed files with 12 additions and 3 deletions

View file

@ -17,7 +17,8 @@ while [[ "$@" ]]; do
;;
'--package')
MAKE_PACKAGE=1
shift
PACKAGE_NAME="$2"
shift 2
;;
'--server')
MAKE_SERVER=1
@ -117,4 +118,12 @@ fi
if [[ $MAKE_PACKAGE ]]; then
make package
if [[ $PACKAGE_NAME ]]; then
if file=$(find . -maxdepth 1 -type f -name Cockatrice-*.* -print -quit); then
mv "$file" "${file%%.*}-$PACKAGE_NAME.${file#*.}"
else
echo "could not find package" >&2
exit 1
fi
fi
fi