Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/repo-add.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/repo-add.sh.in')
-rw-r--r--scripts/repo-add.sh.in26
1 files changed, 7 insertions, 19 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index be0859ea..c89e2a58 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -34,7 +34,6 @@ REPO_DB_FILE=""
umask 0022
msg() {
- [ $QUIET -ne 0 ] && return
local mesg=$1; shift
printf "==> ${mesg}\n" "$@" >&1
}
@@ -68,8 +67,8 @@ repo-remove will update a package database by removing the package name\n\
specified on the command line from the given repo database. Multiple\n\
packages to remove can be specified on the command line.\n\n")"
printf "$(gettext "\
-The -q/--quiet flag to either program will force silent running except\n\
-in the case of warnings or errors.\n\n")"
+Use the -q/--quiet flag to minimize output to basic messages, warnings,\n\
+and errors\n\n")"
echo "$(gettext "Example: repo-add /path/to/repo.db.tar.gz pacman-3.0.0.pkg.tar.gz")"
echo "$(gettext "Example: repo-remove /path/to/repo.db.tar.gz kernel26")"
}
@@ -305,18 +304,6 @@ else
exit 1 # $E_MISSING_PROGRAM
fi
-# source system and user makepkg.conf
-if [ -r "$confdir/makepkg.conf" ]; then
- source "$confdir/makepkg.conf"
-else
- error "$(gettext "%s not found. Cannot continue.")" "$confdir/makepkg.conf"
- exit 1 # $E_CONFIG_ERROR
-fi
-
-if [ -r ~/.makepkg.conf ]; then
- source ~/.makepkg.conf
-fi
-
# main routine
gstmpdir=$(mktemp -d /tmp/repo-tools.XXXXXXXXXX) || (\
error "$(gettext "Cannot create temp directory for database building.")"; \
@@ -387,10 +374,11 @@ if [ $success -eq 1 ]; then
[ -f "${REPO_DB_FILE}.old" ] && rm "${REPO_DB_FILE}.old"
[ -f "$REPO_DB_FILE" ] && mv "$REPO_DB_FILE" "${REPO_DB_FILE}.old"
- case "$DB_COMPRESSION" in
- gz) TAR_OPT="z" ;;
- bz2) TAR_OPT="j" ;;
- *) warning "$(gettext "No compression set.")" ;;
+ case "$REPO_DB_FILE" in
+ *tar.gz) TAR_OPT="z" ;;
+ *tar.bz2) TAR_OPT="j" ;;
+ *) warning "$(gettext "'%s' does not have a valid archive extension.")" \
+ "$REPO_DB_FILE" ;;
esac
bsdtar -c${TAR_OPT}f "$REPO_DB_FILE" *