Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-06-02 11:45:17 -0400
committerDan McGee <dan@archlinux.org>2007-06-02 13:44:54 -0400
commit9883c157f94de4fe1b45ab13b3779e12bf105392 (patch)
treef5a88dec8888e4dc2c1cc8f6ce8717dca14dd50d /scripts
parente19d7da4f9e77c58c662329d62414bf0cab54918 (diff)
makepkg: code cleanup
* Collapse some if statements (Andrew Fyfe) * Add some E_ exit designations Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.in37
1 files changed, 14 insertions, 23 deletions
diff --git a/scripts/makepkg.in b/scripts/makepkg.in
index b76c3f04..1d88e9dc 100644
--- a/scripts/makepkg.in
+++ b/scripts/makepkg.in
@@ -431,8 +431,6 @@ generate_checksums() {
echo ")"
done
-
- exit 0 # $E_OK
}
check_checksums() {
@@ -946,15 +944,15 @@ while [ "$#" -ne "0" ]; do
--source) SOURCEONLY=1 ;;
--help)
usage
- exit 0
+ exit 0 #E_OK
;;
--version)
version
- exit 0
+ exit 0 #E_OK
;;
--*)
usage
- exit 1
+ exit 1 #E_INVALID_OPTION
;;
-*)
while getopts "bcCdefFghiLmop:rRsS-" opt; do
@@ -977,11 +975,11 @@ while [ "$#" -ne "0" ]; do
s) DEP_BIN=1 ;;
h)
usage
- exit 0
+ exit 0 #E_OK
;;
V)
version
- exit 0
+ exit 0 #E_OK
;;
-)
OPTIND=0
@@ -989,7 +987,7 @@ while [ "$#" -ne "0" ]; do
;;
*)
usage
- exit 1
+ exit 1 #E_INVALID_OPTION
;;
esac
done
@@ -1210,37 +1208,30 @@ else
warning "$(gettext "pacman was not found in PATH; skipping dependency checks.")"
fi
+# get back to our src directory so we can begin with sources
cd "$startdir"
-
mkdir -p src
cd "$srcdir"
-if [ "$NOEXTRACT" = "1" -o "$REPKG" = "1" ]; then
- warning "$(gettext "Skipping source retrieval -- using existing src/ tree")"
-else
- download_sources
-fi
-
if [ "$GENINTEG" = "1" ]; then
+ download_sources
generate_checksums
+ exit 0 # $E_OK
fi
if [ "$NOEXTRACT" = "1" -o "$REPKG" = "1" ]; then
+ warning "$(gettext "Skipping source retrieval -- using existing src/ tree")"
warning "$(gettext "Skipping source integrity checks -- using existing src/ tree")"
-else
- check_checksums
-fi
-
-#Extract sources
-if [ "$NOEXTRACT" = "1" -o "$REPKG" = "1" ]; then
warning "$(gettext "Skipping source extraction -- using existing src/ tree")"
else
+ download_sources
+ check_checksums
extract_sources
fi
if [ "$NOBUILD" = "1" ]; then
msg "$(gettext "Sources are ready.")"
- exit 0
+ exit 0 #E_OK
else
# check for existing pkg directory; don't remove if we are repackaging
if [ -d "$pkgdir" -a "$REPKG" = "0" ]; then
@@ -1284,6 +1275,6 @@ msg "$(gettext "Finished making: %s")" "$pkgname ($date)"
installpackage
-exit 0
+exit 0 #E_OK
# vim: set ts=2 sw=2 noet: