summaryrefslogtreecommitdiff
path: root/community/tup/tup.install
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-02-23 16:15:08 -0300
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-02-23 16:15:08 -0300
commit44ae571c1d57a21af2c915b42bb656cf0d69c9ee (patch)
tree757e53f443e27a95d1b1b0cdf337c2147953fc46 /community/tup/tup.install
parenteadbb9961b89668e4aed317f5dd97cb04e86663e (diff)
parent1d20e4962664ab152948a14b4320b12204a1053e (diff)
Merge branch 'master' of gparabola:abslibre/abslibre-pre-mips64el
Conflicts: community/libftdi/PKGBUILD community/lxshortcut/PKGBUILD community/pcmanfm/PKGBUILD community/qingy/PKGBUILD community/yagf/PKGBUILD extra/ethtool/PKGBUILD extra/gptfdisk/PKGBUILD extra/postgresql/PKGBUILD extra/xfburn/PKGBUILD libre/linux-libre/PKGBUILD
Diffstat (limited to 'community/tup/tup.install')
-rw-r--r--community/tup/tup.install30
1 files changed, 30 insertions, 0 deletions
diff --git a/community/tup/tup.install b/community/tup/tup.install
new file mode 100644
index 000000000..4d71928a6
--- /dev/null
+++ b/community/tup/tup.install
@@ -0,0 +1,30 @@
+suid_set=tmp/tup.upgrade.suid_set
+binary=/usr/bin/tup
+
+suid_msg() {
+ if [ -f $suid_set ]; then
+ echo "$binary has suid bit set. It allows you to run commands in chroot-ed environment (e.g. for full dependency tracking)."
+ echo "See 'man tup' for more information."
+ else
+ echo "If you want to be able to run commands in chroot-ed environment (e.g. for full dependency tracking)" \
+ "you need to set suid bit on tup binary: 'sudo chmod +s $binary'."
+ echo "See 'man tup' for more information."
+ fi
+}
+
+pre_upgrade() {
+ [ -u $binary ] && touch $suid_set
+ return 0
+}
+
+post_install() {
+ suid_msg
+ return 0
+}
+
+post_upgrade() {
+ suid_msg
+ [ -f $suid_set ] && chmod +s $binary
+ rm -f $suid_set
+ return 0
+}