summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--].SRCINFO5
-rwxr-xr-x[-rw-r--r--]PKGBUILD6
-rwxr-xr-x[-rw-r--r--]flutter-group-template.hook8
3 files changed, 9 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 40ef248454f..b361837ef21 100644..100755
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,11 @@
pkgbase = flutter-group-pacman-hook
pkgdesc = Pacman hook to fix permission after flutter install/upgrade
pkgver = 1
- pkgrel = 2
+ pkgrel = 4
arch = any
license = GPL
optdepends = flutter
source = flutter-group-template.hook
- sha512sums = f4683f18b58a7847af706d3b433c7e488135406711de2e92ca66eb72beb385f871325c2299e1c69b86118ca56a898d966a86414a2f04f6a8f03ea5a2d31554e2
+ sha512sums = 3d67f48bb56f4312c113daddbd6884c09371f3099a3ad466fb490f2e257dd9c6e8c6f1224de900a774f5bb6b50da2d0ebf1cf617b5077ddffefbff417edbc590
pkgname = flutter-group-pacman-hook
-
diff --git a/PKGBUILD b/PKGBUILD
index 4175d627e93..c2894e26a55 100644..100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,13 +2,13 @@
pkgname=flutter-group-pacman-hook
pkgver=1
-pkgrel=2
+pkgrel=4
pkgdesc="Pacman hook to fix permission after flutter install/upgrade"
arch=("any")
license=("GPL")
optdepends=("flutter")
source=(flutter-group-template.hook)
-sha512sums=("f4683f18b58a7847af706d3b433c7e488135406711de2e92ca66eb72beb385f871325c2299e1c69b86118ca56a898d966a86414a2f04f6a8f03ea5a2d31554e2")
+sha512sums=('3d67f48bb56f4312c113daddbd6884c09371f3099a3ad466fb490f2e257dd9c6e8c6f1224de900a774f5bb6b50da2d0ebf1cf617b5077ddffefbff417edbc590')
_group=flutterusers
_path=/opt/flutter
@@ -46,7 +46,7 @@ prepare(){
_path=${FLUTTER_PATH}
fi
- sed -e "s/\$FLUTTER_GROUP/${_group}/g" -e "s/\$FLUTTER_PATH/${_path//\//\\\/}/g" flutter-group-template.hook > flutter-group.hook
+ sed -e "s/\$FLUTTER_GROUP/${_group}/g" -e "s/\$FLUTTER_PATH/${_path//\//\\\/}/g" -e "s/Target = \//Target = /g" flutter-group-template.hook > flutter-group.hook
}
package() {
diff --git a/flutter-group-template.hook b/flutter-group-template.hook
index 597346685d5..2126ca28d28 100644..100755
--- a/flutter-group-template.hook
+++ b/flutter-group-template.hook
@@ -1,11 +1,11 @@
[Trigger]
-Type = Package
+Type = Path
Operation = Upgrade
Operation = Install
-Target = flutter
-Target = flutter-group-pacman-hook
+Target = $FLUTTER_PATH/version
+Target = usr/share/libalpm/hooks/flutter-group.hook
[Action]
Description = Granting permission to group $FLUTTER_GROUP for flutter SDK ($FLUTTER_PATH)
When = PostTransaction
-Exec = /bin/sh -c 'chown -R :$FLUTTER_GROUP "$FLUTTER_PATH" && chmod -R g+w "$FLUTTER_PATH"'
+Exec = /bin/sh -c 'chown -R :$FLUTTER_GROUP "$FLUTTER_PATH" && chmod -R g+w "$FLUTTER_PATH" && git config --global --add safe.directory "$FLUTTER_PATH"'