diff options
author | Erik Bjäreholt | 2023-11-22 10:00:17 +0100 |
---|---|---|
committer | Erik Bjäreholt | 2023-11-22 10:00:17 +0100 |
commit | 6049ca955fa12efcf6ed00d0b148092c863e74af (patch) | |
tree | 9588311260fb9660ab293fb3a80bba78570f8384 | |
parent | 2e4410ead13cf05472655ab576d776a4e5d61caa (diff) | |
download | aur-6049ca955fa12efcf6ed00d0b148092c863e74af.tar.gz |
fix: symlink aw-sync, aw-watcher-input, and aw-notify to /usr/bin
-rw-r--r-- | PKGBUILD | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -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 |