Files
GDevelop/scripts/CopyResourcesFromWindowsRelease.sh
T
Victor Levasseur 0a230ba5b2 Use HEAD to copy resources from Release_Windows folder
(instead of the master branch)
2015-08-19 13:22:12 +02:00

26 lines
705 B
Bash
Executable File

#!/bin/sh
#This script copy all (versioned) files from Release_Windows into Release_Linux.
#Get the destination, or copy by default to Release_Linux directory
DESTINATION=Release_Linux
if [ ! $# -eq 0 ]; then
DESTINATION=$1
fi
echo "Copying versioned files from Release_Windows to '$DESTINATION'..."
cd ../Binaries/Output/Release_Windows
git archive --format tar.gz --output ../allRuntimeFiles.tar HEAD
if [ $? -eq 0 ]; then
cd ..
tar -xzf allRuntimeFiles.tar -C "$DESTINATION"
rm allRuntimeFiles.tar
else
echo "Can't use git to copy versioned file, fallback to copy the entire Release_Windows to '$DESTINATION'..."
cd ..
cp -a Release_Windows/. $DESTINATION/
fi
cd ../../scripts/
echo "Done."