From 3ee630de88360ab31a0244a2cf25091173095989 Mon Sep 17 00:00:00 2001 From: rhatto Date: Tue, 30 Jan 2007 18:05:58 +0000 Subject: simplepkg 0.4.9pre16 git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@133 04377dda-e619-0410-9926-eae83683ac58 --- lib/common.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/common.sh b/lib/common.sh index 3411f2c..a140ccb 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -108,7 +108,7 @@ function install_packages { for pack in `cat $TEMPLATE | grep -v -e "^#" | cut -d : -f 1`; do # try to install the package - ROOT=/$root ARCH=$ARCH VERSION=$VERSION $SIMPLARET --install $pack + ROOT=/$root ARCH=$ARCH VERSION=$VERSION $SIMPLARET --install $pack --skip-checks # check if the package was installed installed=`eval "ls /$root/var/log/packages/ | egrep '^$pack-[^-]+-[^-]+-[^-]+$'"` @@ -255,7 +255,11 @@ function eval_config { function default_version { # get version from /etc/slackware-version - cat $1/etc/slackware-version | awk '{ print $2 }' | sed -e 's/.0$//' + if [ -f "$1/etc/slackware-version" ]; then + cat $1/etc/slackware-version | awk '{ print $2 }' | sed -e 's/.0$//' + else + echo "none" + fi } -- cgit v1.2.3