From 79959988e9333db445a26a274f71517819a66161 Mon Sep 17 00:00:00 2001 From: rhatto Date: Fri, 28 Nov 2008 18:45:14 +0000 Subject: fixes git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@608 04377dda-e619-0410-9926-eae83683ac58 --- trunk/lib/common.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'trunk/lib/common.sh') 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 + 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 -- cgit v1.2.3