aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Bjäreholt2023-11-22 10:00:17 +0100
committerErik Bjäreholt2023-11-22 10:00:17 +0100
commit6049ca955fa12efcf6ed00d0b148092c863e74af (patch)
tree9588311260fb9660ab293fb3a80bba78570f8384
parent2e4410ead13cf05472655ab576d776a4e5d61caa (diff)
downloadaur-6049ca955fa12efcf6ed00d0b148092c863e74af.tar.gz
fix: symlink aw-sync, aw-watcher-input, and aw-notify to /usr/bin
-rw-r--r--PKGBUILD18
1 files changed, 16 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8fcf687b35d2..7207927ad340 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -34,9 +34,23 @@ package() {
ln -s /opt/activitywatch/$name $pkgdir/usr/bin/$name
done
- modulenames=("aw-server" "aw-server-rust" "aw-watcher-afk" "aw-watcher-window")
+ modulenames=("aw-server" "aw-server-rust" "aw-watcher-afk" "aw-watcher-window" "aw-watcher-input" "aw-notify" "aw-server-rust/aw-sync")
for name in "${modulenames[@]}"; do
- ln -s /opt/activitywatch/$name/$name $pkgdir/usr/bin/$name
+ # if a module has a path, use that,
+ # else assume its in a dir with the same name as the module
+ dir=$(dirname $name)
+ if [ "$dir" == "." ]; then
+ dir=$name
+ else
+ # strip the path from the name
+ name=$(basename $name)
+ fi
+ # check that the module exists
+ if [ ! -f "/opt/activitywatch/$dir/$name" ]; then
+ echo "WARNING: $dir/$name does not exist, skipping"
+ continue
+ fi
+ ln -s /opt/activitywatch/$dir/$name $pkgdir/usr/bin/$name
done
# Add .desktop file for autostart