if [ $SEPARATE -eq 1 -a ! -d $OUT_FILE ]; then
echo "When creating multiple archives, your destination must be a directory."
echo "If it's not, you risk being surprised when your files are overwritten."
- exit
+ exit 1
elif [ `git config -l | grep -q '^core\.bare=false'; echo $?` -ne 0 ]; then
echo "$PROGRAM must be run from a git working copy (i.e., not a bare repository)."
- exit
+ exit 1
+elif ! git rev-parse HEAD &> /dev/null; then
+ echo "You must have some commit in the git working copy."
+ exit 1
fi
# Create the superproject's git-archive