Changed zip command, so that only one parent directory is included
This commit is contained in:
		@@ -4,10 +4,10 @@
 | 
			
		||||
 | 
			
		||||
set -o errexit # Stop executing when a command fails
 | 
			
		||||
BASE_DIR=$(dirname $0)
 | 
			
		||||
REL_DIR="$BASE_DIR/release/dist"
 | 
			
		||||
REL_DIR="$BASE_DIR/release/dist/pong"
 | 
			
		||||
RAYLIB_DLL="$BASE_DIR/build/subprojects/raylib/libraylib.dll"
 | 
			
		||||
 | 
			
		||||
mkdir -p "$REL_DIR"
 | 
			
		||||
rm -r "$REL_DIR"; mkdir -p "$REL_DIR"
 | 
			
		||||
 | 
			
		||||
# Set up the build directory
 | 
			
		||||
meson setup build/
 | 
			
		||||
@@ -30,6 +30,9 @@ cp "$BASE_DIR/build/pong" "$REL_DIR"
 | 
			
		||||
# Remove the temporary file.
 | 
			
		||||
rm "$BASE_DIR/tmp_file.txt"
 | 
			
		||||
 | 
			
		||||
#Zip the $REL_DIR folder
 | 
			
		||||
zip -r "$BASE_DIR/release/netpong-win.zip" "$REL_DIR"
 | 
			
		||||
# Go to the parent directory of $REL_DIR, and zip the $REL_DIR directory. This ensures
 | 
			
		||||
# that the parent directories aren't included in the zip file.
 | 
			
		||||
# The command is enclosed in parantheses, to ensure that the main shell's directory
 | 
			
		||||
# isn't changed.
 | 
			
		||||
(cd "$REL_DIR/.." && zip -r "./netpong-win.zip" "./pong")
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user