implement getmodprefix
This commit is contained in:
11
Run.sh
Normal file → Executable file
11
Run.sh
Normal file → Executable 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
|
||||
|
||||
Reference in New Issue
Block a user