add files
This commit is contained in:
79
Run.sh
Normal file
79
Run.sh
Normal file
@@ -0,0 +1,79 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
OUTPUT_DIR="$2"
|
||||
CFG_FILE="$3"
|
||||
DEFAULT_CFG_FILE=UnrealTournament.ini
|
||||
|
||||
|
||||
function install() {
|
||||
cp $SCRIPT_DIR/Help $OUTPUT_DIR/Help -Rf
|
||||
cp $SCRIPT_DIR/Textures $OUTPUT_DIR/Textures -Rf
|
||||
|
||||
echo install ok
|
||||
}
|
||||
|
||||
function enable() {
|
||||
echo enable ok
|
||||
}
|
||||
|
||||
function disable() {
|
||||
echo disable ok
|
||||
}
|
||||
|
||||
function show_help() {
|
||||
echo
|
||||
echo "Usage: $0 { install | enable | disable } <UT99_INSTALL_DIR> [<UT99_CONFIG_FILE>]"
|
||||
echo
|
||||
}
|
||||
|
||||
function check_cfg_file() {
|
||||
if [ -z ${CFG_FILE} ]
|
||||
then
|
||||
echo "CFG_FILE is unset, setting it to $DEFAULT_CFG_FILE"
|
||||
CFG_FILE=$DEFAULT_CFG_FILE
|
||||
else
|
||||
echo "CFG_FILE is set to '$CFG_FILE'"
|
||||
fi
|
||||
|
||||
if [ ! -f $OUTPUT_DIR/System/$CFG_FILE ]
|
||||
then
|
||||
echo "$OUTPUT_DIR/System/$CFG_FILE does not exist"
|
||||
show_help
|
||||
exit 9999 # die with error code 9999
|
||||
fi
|
||||
}
|
||||
|
||||
function check_game_dir() {
|
||||
### Check if a directory does not exist ###
|
||||
if [ ! -d $OUTPUT_DIR ]
|
||||
then
|
||||
echo "incorrect <UT99_INSTALL_DIR>"
|
||||
show_help
|
||||
exit 9999 # die with error code 9999
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
'install')
|
||||
check_game_dir
|
||||
install
|
||||
;;
|
||||
'enable')
|
||||
check_game_dir
|
||||
check_cfg_file
|
||||
disable
|
||||
enable
|
||||
;;
|
||||
'disable')
|
||||
check_game_dir
|
||||
check_cfg_file
|
||||
disable
|
||||
;;
|
||||
*)
|
||||
show_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
BIN
Textures/CountryFlags32b.utx
Normal file
BIN
Textures/CountryFlags32b.utx
Normal file
Binary file not shown.
BIN
Textures/CountryFlags32s.utx
Normal file
BIN
Textures/CountryFlags32s.utx
Normal file
Binary file not shown.
BIN
Textures/CountryFlags64b.utx
Normal file
BIN
Textures/CountryFlags64b.utx
Normal file
Binary file not shown.
BIN
Textures/CountryFlags64s.utx
Normal file
BIN
Textures/CountryFlags64s.utx
Normal file
Binary file not shown.
Reference in New Issue
Block a user