com_clubs/scripts/create-release.sh

24 lines
538 B
Bash
Executable File

#!/bin/bash
MAJOR=`cat serial/major`
MINOR=`cat serial/minor`
RELEASE=`cat serial/release`
TOTRELEASE="$MAJOR.$MINOR.$RELEASE"
outname="releases/clubs-$TOTRELEASE.tar.gz"
mkdir -p releases
# First check if the named release exists already
if [ -f "$outname" ]; then
if [ "$1" = '-f' ]; then
echo "Overwriting existing file $outname."
else
echo "The file $outname existes already. Either remove the release from the folder manually or increase the release version."
echo "Aborting."
exit 1
fi
fi
cp clubs.tar.gz "$outname"