Merge branch 'use-global-conf'
This commit is contained in:
commit
4adb0d6b2f
@ -28,13 +28,12 @@
|
||||
readonly mode=$(echo $1 | tr -d '-')
|
||||
readonly md5list="$2"
|
||||
moviedir="$3"
|
||||
}
|
||||
|
||||
{ #db
|
||||
dbname="tt_test"
|
||||
dbhost="localhost"
|
||||
dbuser="root"
|
||||
dbpwd=""
|
||||
#db
|
||||
dbname=$(grep -v '#' $globalconf | grep ^dbname= | sed "s|^dbname=||g" | tr -d '"')
|
||||
dbhost=$(grep -v '#' $globalconf | grep ^dbhost= | sed "s|^dbhost=||g" | tr -d '"')
|
||||
dbuser=$(grep -v '#' $globalconf | grep ^dbuser= | sed "s|^dbuser=||g" | tr -d '"')
|
||||
dbpwd=$(grep -v '#' $globalconf | grep ^dbpwd= | sed "s|^dbpwd=||g" | tr -d '"')
|
||||
}
|
||||
|
||||
function help() {
|
||||
|
@ -32,13 +32,12 @@
|
||||
moviedir=""$(echo $moviedir | sed 's|/$||g')""
|
||||
[ -z "$moviedir" ] && exit 255 #catch case moviedir="/"
|
||||
readonly DATE=$(date '+%Y-%m-%d')
|
||||
}
|
||||
|
||||
{ #db
|
||||
dbname="tt_test"
|
||||
dbhost="localhost"
|
||||
dbuser="root"
|
||||
dbpwd=""
|
||||
#db
|
||||
dbname=$(grep -v '#' $globalconf | grep ^dbname= | sed "s|^dbname=||g" | tr -d '"')
|
||||
dbhost=$(grep -v '#' $globalconf | grep ^dbhost= | sed "s|^dbhost=||g" | tr -d '"')
|
||||
dbuser=$(grep -v '#' $globalconf | grep ^dbuser= | sed "s|^dbuser=||g" | tr -d '"')
|
||||
dbpwd=$(grep -v '#' $globalconf | grep ^dbpwd= | sed "s|^dbpwd=||g" | tr -d '"')
|
||||
}
|
||||
|
||||
function help() {
|
||||
|
Loading…
Reference in New Issue
Block a user