From efe747704f0ea83b2ca01d76dcebffec6dd4f1b1 Mon Sep 17 00:00:00 2001 From: Joshua Bussdieker Date: Sat, 28 Jan 2012 12:50:08 -0800 Subject: [PATCH] Updated pkg install script to build from local source --- bin/gvm-pkg-install | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bin/gvm-pkg-install b/bin/gvm-pkg-install index 26d66e4..f0fd230 100755 --- a/bin/gvm-pkg-install +++ b/bin/gvm-pkg-install @@ -1,4 +1,11 @@ #!/bin/bash +if [ "$3" == "" ]; then + echo "Please specify package name" + exit 1 +fi + +cur_dir=`pwd` +cur_dirname=`pwd | awk '{ n=split($1,path,"/"); print path[n] }'` cache_dir=$GVM_ROOT/archive/package/$3 source_dir=$GVM_ROOT/tmp/$3/src build_dir=$GVM_ROOT/tmp/$3/build @@ -93,7 +100,13 @@ function cleanup() { rm -rf $source_dir } -download_package +if [ "$cur_dirname" == "$package_name" ]; then + cache_dir=$cur_dir + BUILD_NUMBER=src + echo "Using local source" +else + download_package +fi setup_build_env check_deps build_package