diff options
Diffstat (limited to 'trunk/utils')
-rwxr-xr-x | trunk/utils/add-slack-required | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/trunk/utils/add-slack-required b/trunk/utils/add-slack-required index d402c52..ede8713 100755 --- a/trunk/utils/add-slack-required +++ b/trunk/utils/add-slack-required @@ -4,17 +4,23 @@ # by rhatto at riseup.net # -slackbuild="/path/to/slackbuilds" -repository="/path/to/packages" - COMMON="/usr/libexec/simplepkg/common.sh" BASENAME="`basename $0`" -if [ ! -d "$slackbuild" ] || [ ! -d "$repository" ]; then - echo $BASENAME: folder not found: $slackbuild or $repository +if [ -z "$2" ]; then + echo "usage: $BASENAME /path/to/slackbuilds /path/to/packages" + exit 1 +elif [ ! -d "$1" ]; then + echo "$BASENAME: folder not found: $1" + exit 1 +elif [ ! -d "$2" ]; then + echo "$BASENAME: folder not found: $2" exit 1 fi +slackbuild="$1" +repository="$2" + # we need the function package_name if [ -f "$COMMON" ]; then source $COMMON @@ -26,7 +32,7 @@ fi function search_and_copy_slackbuild { if [ -f "$1" ]; then - echo copying `basename $1` to `dirname $package`/$pack.slack-required + echo Copying `basename $1` to `dirname $package`/$pack.slack-required cp $1 `dirname $package`/$pack.slack-required svn add `dirname $package`/$pack.slack-required 2> /dev/null fi |