diff options
Diffstat (limited to 'trunk/lib')
-rw-r--r-- | trunk/lib/common.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index cbe6680..45fd6ae 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -120,6 +120,8 @@ function install_packages { function remove_packages { + local pack + for pack in `cat $TEMPLATE | grep -v -e "^#" | cut -d : -f 1`; do ROOT=/$JAIL_ROOT/$server removepkg $pack done @@ -510,6 +512,8 @@ function svn_check { # check if a file is under svn # usage: svn_check <file> + local folder file + folder="`dirname $1`" file="`basename $1`" @@ -580,6 +584,8 @@ function svn_add { function svn_del { + local file folder + file="$1" folder="`dirname $file`" @@ -601,6 +607,8 @@ function svn_copy { if [ -e "$1" ]; then + local orig file dest + orig="`dirname $1`" file="`basename $1`" dest="$2" @@ -676,6 +684,8 @@ function svn_remove_empty_folders { return 1 fi + local folder + for folder in `find $1 -type d -print | grep -v "/\.svn" | sort -r`; do if [ "`ls -A -1 $folder | grep -v -e '^\.svn' | wc -l`" -eq "0" ]; then svn_del $folder @@ -780,6 +790,7 @@ function svn_add_meta { } function gen_filelist { + # generate FILELIST.TXT # usage: gen_filelist @@ -798,6 +809,7 @@ function gen_patches_filelist { if [ ! -z "$1" ] && [ -d "$1" ]; then + local folder folder="$1" ( @@ -828,6 +840,7 @@ function gen_packages_txt { if [ ! -z "$1" ] && [ -d "$1" ]; then + local folder folder="$1" ( @@ -860,6 +873,7 @@ function gen_md5_checksums { if [ -d "$1" ]; then + local folder folder="$1" ( @@ -894,6 +908,7 @@ function update_md5_checksum { if [ -z "$2" ] || [ ! -d "$1" ] || [ ! -f "$1/$2" ]; then return 1 else + local file folder file="$2" folder="$1" fi |