summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpkg.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg.sh b/pkg.sh
index b47e895..3d5563c 100755
--- a/pkg.sh
+++ b/pkg.sh
@@ -1,6 +1,7 @@
usage() {
echo ""
echo "Usage: $0 <add|update> <pkgname>"
+ echo " $0 import <pkgname> [pkgname] ..."
echo ""
echo "This script wraps the typical AUR creation and update procedures"
echo ""
@@ -24,6 +25,13 @@ update_pkg() {
git pull -s subtree $pkgname master
}
+import_pkgs() {
+ for pkgname in "$@"
+ do
+ add_pkg $pkgname
+ done
+}
+
case "$1" in
add)
add_pkg $2
@@ -31,6 +39,9 @@ case "$1" in
update)
update_pkg $2
;;
+ import)
+ import_pkgs "${@:2}"
+ ;;
*)
usage
esac