Fix dos line endings in shell script (#434)
This commit is contained in:
+34
-34
@@ -1,34 +1,34 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# NOTE: This script is meant to be run from
|
# NOTE: This script is meant to be run from
|
||||||
# the root repository directory to work as intended.
|
# the root repository directory to work as intended.
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
GAME_NAME="${GAME_NAME-balatro-gba}"
|
GAME_NAME="${GAME_NAME-balatro-gba}"
|
||||||
timestamp=$(date +%Y%m%d_%H%M%S)
|
timestamp=$(date +%Y%m%d_%H%M%S)
|
||||||
arg=${1:-"build"}
|
arg=${1:-"build"}
|
||||||
dir="saved_builds/${arg}_${timestamp}"
|
dir="saved_builds/${arg}_${timestamp}"
|
||||||
|
|
||||||
mkdir -p "$dir"
|
mkdir -p "$dir"
|
||||||
|
|
||||||
failed=0
|
failed=0
|
||||||
for fe in elf gba map; do
|
for fe in elf gba map; do
|
||||||
if [ -f build/"$GAME_NAME".$fe ]; then
|
if [ -f build/"$GAME_NAME".$fe ]; then
|
||||||
cp build/"$GAME_NAME".$fe "$dir/"
|
cp build/"$GAME_NAME".$fe "$dir/"
|
||||||
else
|
else
|
||||||
echo "Warning: build/$GAME_NAME.$fe not found"
|
echo "Warning: build/$GAME_NAME.$fe not found"
|
||||||
failed=1
|
failed=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $failed -eq 1 ]; then
|
if [ $failed -eq 1 ]; then
|
||||||
echo "Some files are missing, partially saved to $dir"
|
echo "Some files are missing, partially saved to $dir"
|
||||||
else
|
else
|
||||||
echo "Build files saved to $dir"
|
echo "Build files saved to $dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit $failed
|
exit $failed
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user