Einführung in die Programmierung WS19/20 Programmieren des Spieles "Breakout" basierend auf dem Framework des Instituts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

32 lines
854 B

#!/usr/bin/env zsh
# project prefix
PREFIX="262-BreakOutA"
# get versioning
echo -n "Type your tag version for '$PREFIX' (like (2.1) followed by [ENTER] for ${PREFIX}2.1): "
read VERSION
echo "Your version: ${PREFIX}${VERSION}"
# to CTRL-C
echo -n "Press any key to continue..."
read -n 1
if [ -d "./src/break_out" ] && [ -f ".gitignore" ];
then
ln -s ./ "${PREFIX}${VERSION}" # create temporary soft link
#update .project version
xmlstarlet edit -L -u "//projectDescription/name" -v "${PREFIX}${VERSION}" .project
# file list
FILELIST=('.idea' 'doc' 'libs' 'res' 'src' '.classpath' '.project' 'README.md')
for i in "${FILELIST[@]}"; do
zip -r "${PREFIX}${VERSION}".zip "./${PREFIX}${VERSION}/${i}"
done
rm "${PREFIX}${VERSION}" # remove soft link
echo "Have fun"
else
echo "You are not in the correct working directory"
fi