Update Run.sh

This commit is contained in:
2023-09-30 18:18:58 +02:00
parent 7bac59838e
commit 88d6ab498a

8
Run.sh
View File

@@ -1,15 +1,19 @@
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
OUTPUT_DIR="$2"
MOD_NAME="$3"
function install() {
rsync -a $SCRIPT_DIR/usermaps/ $OUTPUT_DIR/usermaps/ --exclude '.git'
rsync -a $SCRIPT_DIR/usermaps/ $OUTPUT_DIR/usermaps/ --exclude '.git' --exclude '.iwd'
find $SCRIPT_DIR/usermaps/ -name \*.iwd | rsync -av --files-from - --no-relative . $OUTPUT_DIR/mods/$MOD_NAME/
echo install ok
}
function show_help() {
echo
echo "Usage: $0 { install } <COD_INSTALL_DIR>"
echo "Usage: $0 { install } <COD_INSTALL_DIR> <MOD_NAME>"
echo Note: <MOD_NAME> is mandatory because custom map needs a mod (even empty)
echo
}