diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-11-28 18:45:14 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-11-28 18:45:14 +0000 |
commit | 79959988e9333db445a26a274f71517819a66161 (patch) | |
tree | b15df0d438347587a7f5b591fbc37dab9fe373ba /trunk/lib | |
parent | 1f51a767ed556687e5bb5f6068390108bf9c2706 (diff) | |
download | simplepkg-79959988e9333db445a26a274f71517819a66161.tar.gz simplepkg-79959988e9333db445a26a274f71517819a66161.tar.bz2 |
fixes
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@608 04377dda-e619-0410-9926-eae83683ac58
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 |