summaryrefslogtreecommitdiff
path: root/includes/generic-includes.sh
diff options
context:
space:
mode:
authornick <myownlittlworld@hotmail.com>2009-05-25 18:14:01 -0500
committernick <myownlittlworld@hotmail.com>2009-05-25 18:14:01 -0500
commit6ec9844921a2a465e02c26e0a09344aaff70fe93 (patch)
tree48da0a09acf14eb8ba96675030ca61fc951b4261 /includes/generic-includes.sh
parentbbacc8174082cfda8e8a4096105c82de308e172e (diff)
downloadgemrb-gameinstallers-6ec9844921a2a465e02c26e0a09344aaff70fe93.tar.bz2
gemrb-gameinstallers-6ec9844921a2a465e02c26e0a09344aaff70fe93.zip
Created the BG2 4CD US Minimal Installer.
Diffstat (limited to 'includes/generic-includes.sh')
-rw-r--r--includes/generic-includes.sh25
1 files changed, 17 insertions, 8 deletions
diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh
index 51cffcb..1e0e89d 100644
--- a/includes/generic-includes.sh
+++ b/includes/generic-includes.sh
@@ -56,13 +56,13 @@ function diequietly
function setuptmp
{
- rm -rf $TMPDIR
- mkdir -p $TMPDIR || die
+ rm -rf "$TMPDIR"
+ mkdir -p "$TMPDIR" || die
}
function cleanuptmp
{
- rm -rf $TMPDIR
+ rm -rf "$TMPDIR"
}
function checkforbin
@@ -71,7 +71,7 @@ function checkforbin
retstatus=0
while [ "$1" != "" ]; do
- binname=$1
+ binname="$1"
which "$binname" &> /dev/null
if [ $? -ne 0 ]; then
@@ -110,13 +110,13 @@ function usage
{
echo "Usage:" $0 "[-i installdir] [-p patchdir] [-c cdmount] [-l language]"
echo -e " -i installdir is the directory to install to."
- echo -e " default:" $TARGETDIR
+ echo -e " default: ${TARGETDIR} (changes per game)"
echo -e " -c cdmount is the mount location of the cd drive used."
- echo -e " default:" $CDMOUNT
+ echo -e " default: ${CDMOUNT}"
echo -e " -p patchdir is an optional directory containing patch files."
- echo -e " default:" $PATCHDIR
+ echo -e " default: ${PATCHDIR}"
echo -e " -l language can be one of English, Spanish, French, German, Italian or Language Independant"
- echo -e " default:" $LANGUAGE
+ echo -e " default: ${LANGUAGE}"
# TODO: Add option to show and select all known BG1 versions
}
@@ -150,3 +150,12 @@ function copylower
cp -f "$(echo $1|tr A-Z a-z)" "$2"
fi
}
+
+function move_and_remove
+{
+ # usage: move_and_remove source destination
+ # copies the files in the source directory to the destination.
+ mkdir -p "$2" || die
+ cp -R "$1/"* "$2" || die
+ rm -r "$1"
+}