[arch-dev-public] [PATCH] Allow repo name to be specified on command line
dpmcgee at gmail.com
dpmcgee at gmail.com
Fri May 30 19:44:41 EDT 2008
From: Dan McGee <dan at archlinux.org>
Move the extrapkg script to the name repopkg. All of the corepkg/extrapkg
etc. scripts will retain their same behavior; however if the program is
called with the name repopkg the first parameter passed will be used as the
repository name to upload to.
Note that the non-existence of this directory on the remote end will
probably result in failure.
Signed-off-by: Dan McGee <dan at archlinux.org>
---
Makefile | 14 ++++++++------
extrapkg => repopkg | 7 +++++--
2 files changed, 13 insertions(+), 8 deletions(-)
rename extrapkg => repopkg (96%)
diff --git a/Makefile b/Makefile
index 384e7e0..75c83c9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,14 @@
all:
install:
- # extrapkg/checkpkg and friends
+ # repopkg/checkpkg and friends
mkdir -p $(DESTDIR)/usr/bin
install -m 755 checkpkg $(DESTDIR)/usr/bin
- install -m 755 extrapkg $(DESTDIR)/usr/bin
- ln -sf extrapkg $(DESTDIR)/usr/bin/corepkg
- ln -sf extrapkg $(DESTDIR)/usr/bin/testingpkg
- ln -sf extrapkg $(DESTDIR)/usr/bin/unstablepkg
+ install -m 755 repopkg $(DESTDIR)/usr/bin
+ ln -sf repopkg $(DESTDIR)/usr/bin/corepkg
+ ln -sf repopkg $(DESTDIR)/usr/bin/extrapkg
+ ln -sf repopkg $(DESTDIR)/usr/bin/testingpkg
+ ln -sf repopkg $(DESTDIR)/usr/bin/unstablepkg
# arch{co,release,rm}
install -m 755 archco $(DESTDIR)/usr/bin
install -m 755 archrelease $(DESTDIR)/usr/bin
@@ -23,8 +24,9 @@ install:
uninstall:
# remove all files we installed
rm $(DESTDIR)/usr/bin/checkpkg
- rm $(DESTDIR)/usr/bin/extrapkg
+ rm $(DESTDIR)/usr/bin/repopkg
rm $(DESTDIR)/usr/bin/corepkg
+ rm $(DESTDIR)/usr/bin/extrapkg
rm $(DESTDIR)/usr/bin/testingpkg
rm $(DESTDIR)/usr/bin/unstablepkg
rm $(DESTDIR)/usr/sbin/mkarchroot
diff --git a/extrapkg b/repopkg
similarity index 96%
rename from extrapkg
rename to repopkg
index fa72c53..04b6451 100755
--- a/extrapkg
+++ b/repopkg
@@ -13,7 +13,7 @@ if [ -r ~/.makepkg.conf ]; then
source ~/.makepkg.conf
fi
-cmd=`basename $0`
+cmd=$(basename $0)
if [ ! -f PKGBUILD ]; then
echo "No PKGBUILD file"
@@ -38,7 +38,10 @@ if [ ! -f $pkgfile ]; then
fi
fi
-if [ "$cmd" == "extrapkg" ]; then
+if [ "$cmd" == "repopkg" ]; then
+ repo="$1"
+ shift
+elif [ "$cmd" == "extrapkg" ]; then
repo="extra"
elif [ "$cmd" == "corepkg" ]; then
repo="core"
--
1.5.5.3
More information about the arch-dev-public
mailing list