summaryrefslogtreecommitdiffstats
path: root/scripts/pacman-db-upgrade.sh.in
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-28 03:41:23 +0200
committerDan McGee <dan@archlinux.org>2011-03-28 03:41:23 +0200
commit3f269503d53811cf45037022a263f2447e427a0b (patch)
tree437753d28e59d3add63e48b4cfd4d77cd95e1cfc /scripts/pacman-db-upgrade.sh.in
parent630b7b94c39ddc60d4e2b3c80d5d9f3101049b93 (diff)
parentea216d3f5a84814c512ab51ac37a4055b82032c3 (diff)
downloadpacman-3f269503d53811cf45037022a263f2447e427a0b.tar.gz
pacman-3f269503d53811cf45037022a263f2447e427a0b.tar.xz
Merge branch 'maint'
Conflicts: lib/libalpm/deps.c
Diffstat (limited to 'scripts/pacman-db-upgrade.sh.in')
-rw-r--r--scripts/pacman-db-upgrade.sh.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/pacman-db-upgrade.sh.in b/scripts/pacman-db-upgrade.sh.in
index 0813acc6..17d8beb4 100644
--- a/scripts/pacman-db-upgrade.sh.in
+++ b/scripts/pacman-db-upgrade.sh.in
@@ -83,10 +83,14 @@ if [[ -n $1 ]]; then
dbroot="$1"
fi
-if [[ ! -d $dbroot || ! -d $dbroot/local ]]; then
+if [[ ! -d $dbroot ]]; then
die "$(gettext "%s does not exist or is not a directory.")" "$dbroot"
fi
+if [[ ! -d $dbroot/local ]]; then
+ die "$(gettext "%s is not a pacman database directory.")" "$dbroot"
+fi
+
if [[ ! -w $dbroot ]]; then
die "$(gettext "You must have correct permissions to upgrade the database.")"
fi