aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2017-10-02 16:19:15 +0200
committerGravatar Christian Hesse <mail@eworm.de>2017-10-02 16:19:15 +0200
commit5749c1d7df98d8e6aa2bbf9806b6a4d7a08101e0 (patch)
tree07a2643a6e44f0574051f82bba53e3b201b8c843
parent356f59161269c8623cd994ae30ccf127e8f79461 (diff)
downloadpacman-offline-5749c1d7df98d8e6aa2bbf9806b6a4d7a08101e0.tar.gz
pacman-offline-5749c1d7df98d8e6aa2bbf9806b6a4d7a08101e0.tar.zst
make sure no other update is pending
-rwxr-xr-xbin/pacman-offline6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/pacman-offline b/bin/pacman-offline
index 0b21b09..8f86868 100755
--- a/bin/pacman-offline
+++ b/bin/pacman-offline
@@ -21,6 +21,12 @@ while getopts 'hy' opt; do
esac
done
+# make sure no other update is pending
+if [ "$(readlink '/system-update')" != '/var/cache/pacman/pkg' ]; then
+ echo 'Another update is pending.' >&2
+ exit 1
+fi
+
# remove the symlink for now, will be recreated it later
rm -f /system-update