implement getmodprefix

This commit is contained in:
2023-10-04 00:46:11 +02:00
parent 7e143f2d19
commit 37c22acedd

11
Run.sh Normal file → Executable file
View File

@@ -7,6 +7,10 @@ function install() {
echo install ok
}
function getmodprefix() {
basename $(find $SCRIPT_DIR/mods/ -maxdepth 1 -mindepth 1 -type d | head -z -n 1)
}
function show_help() {
echo
echo "Usage: $0 { install } <COD_INSTALL_DIR>"
@@ -24,7 +28,10 @@ function check_game_dir() {
}
case "$1" in
'getmodprefix')
check_game_dir
getmodprefix
;;
'install')
check_game_dir
install
@@ -34,4 +41,4 @@ case "$1" in
exit 1
;;
esac
exit 0
exit 0