diff options
Diffstat (limited to 'includes/generic-includes.sh')
-rw-r--r-- | includes/generic-includes.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh index b58177b..e90199c 100644 --- a/includes/generic-includes.sh +++ b/includes/generic-includes.sh @@ -21,6 +21,8 @@ [ -z "$LANGUAGE" ] && export LANGUAGE="English" +[ -z "$SKIP_DETECTION" ] && export SKIP_DETECTION=0 + ### functions ### function die @@ -108,7 +110,7 @@ function setperms function usage { - echo "Usage:" $0 "[-i installdir] [-p patchdir] [-c cdmount] [-l language]" + echo "Usage:" $0 "[-i installdir] [-p patchdir] [-c cdmount] [-l language] [-n]" echo -e " -i installdir is the directory to install to." echo -e " default: ${TARGETDIR} (changes per game)" echo -e " -c cdmount is the mount location of the cd drive used." @@ -117,19 +119,21 @@ function usage echo -e " default: ${PATCHDIR}" echo -e " -l language can be one of English, Spanish, French, German, Italian or Language Independant" echo -e " default: ${LANGUAGE}" - # TODO: Add option to show and select all known BG1 versions + echo -e " -n skip CD autodetection" + echo -e " default: off" } function parseargs { # usage: parseargs args... - while getopts ":i:p:c:l:" options; do + while getopts ":i:p:c:l:n" options; do case $options in i ) export TARGETDIR="$OPTARG";; p ) export PATCHDIR="$OPTARG";; c ) export CDMOUNT="${OPTARG%\/}";; # ensure no trailing slash l ) export LANGUAGE="$OPTARG";; + n ) export SKIP_DETECTION=1;; \? ) usage exit 1;; h ) usage |