From bbc18724891ee58eebe509eb08c816f44c25e965 Mon Sep 17 00:00:00 2001 From: chacha Date: Sat, 15 Apr 2023 19:26:19 +0200 Subject: [PATCH] add missing .keep and Run.sh --- Run.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ System/.keep | 0 2 files changed, 42 insertions(+) create mode 100644 Run.sh create mode 100644 System/.keep diff --git a/Run.sh b/Run.sh new file mode 100644 index 0000000..34248f1 --- /dev/null +++ b/Run.sh @@ -0,0 +1,42 @@ +#!/bin/bash +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +OUTPUT_DIR="$2" + +function install() { + rsync -a $SCRIPT_DIR/Maps/ $OUTPUT_DIR/Maps/ --exclude '.git' + rsync -a $SCRIPT_DIR/Music/ $OUTPUT_DIR/Music/ --exclude '.git' + rsync -a $SCRIPT_DIR/System/ $OUTPUT_DIR/System/ --exclude '.git' + rsync -a $SCRIPT_DIR/Textures/ $OUTPUT_DIR/Textures/ --exclude '.git' + rsync -a $SCRIPT_DIR/Sounds/ $OUTPUT_DIR/Sounds/ --exclude '.git' + + echo install ok +} + +function show_help() { + echo + echo "Usage: $0 { install } " + echo +} + +function check_game_dir() { + ### Check if a directory does not exist ### + if [ -z $OUTPUT_DIR ] + then + echo "incorrect " + show_help + exit 9999 # die with error code 9999 + fi +} + +case "$1" in + + 'install') + check_game_dir + install + ;; + *) + show_help + exit 1 + ;; +esac +exit 0 \ No newline at end of file diff --git a/System/.keep b/System/.keep new file mode 100644 index 0000000..e69de29