]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
fix install-gamepack abort with an empty src dir
authorRudolf Polzer <divVerent@xonotic.org>
Sat, 2 Apr 2011 10:55:10 +0000 (12:55 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Sat, 2 Apr 2011 10:55:10 +0000 (12:55 +0200)
install-gamepack.sh

index 1f14966653cb80b7c00f6966b7f9717bb2defb45..3a36c200ecdd6a6c3e1f788903d249ad25f877b7 100755 (executable)
@@ -16,8 +16,12 @@ if [ -d "$pack/tools" ]; then
        pack="$pack/tools"
 fi
 for GAMEFILE in "$pack/games"/*.game; do
-       $CP "$GAMEFILE" "$dest/games/"
+       if [ x"$GAMEFILE" != x"$pack/games/*.game" ]; then
+               $CP "$GAMEFILE" "$dest/games/"
+       fi
 done
 for GAMEDIR in "$pack"/*.game; do
-       $CP_R "$GAMEDIR" "$dest/"
+       if [ x"$GAMEDIR" != x"$pack/*.game" ]; then
+               $CP_R "$GAMEDIR" "$dest/"
+       fi
 done