flatpakifier.bash: remove dangling symlinks in the end

This commit is contained in:
Aminda Suomalainen 2024-08-03 11:40:17 +03:00
parent cbd0a6ef02
commit eefb5968de
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# This script partially reverts https://gitea.blesmrt.net/mikaela/scripts/commit/e76a4a6a0d0472428d519205543171b1b1cdc258 # This script partially reverts
# https://gitea.blesmrt.net/mikaela/scripts/commit/e76a4a6a0d0472428d519205543171b1b1cdc258
export FLATPAKEXPORTS=/var/lib/flatpak/exports/bin export FLATPAKEXPORTS=/var/lib/flatpak/exports/bin
#export TARGETDIR=~/.local/bin #export TARGETDIR=~/.local/bin
@ -27,4 +28,12 @@ ln -sfv $FLATPAKEXPORTS/im.dino.Dino $TARGETDIR/dino
#ln -sfv $FLATPAKEXPORTS/chat.schildi.desktop $TARGETDIR/schildichat #ln -sfv $FLATPAKEXPORTS/chat.schildi.desktop $TARGETDIR/schildichat
#ln -sfv $FLATPAKEXPORTS/org.signal.Signal $TARGETDIR/signal-desktop #ln -sfv $FLATPAKEXPORTS/org.signal.Signal $TARGETDIR/signal-desktop
# If symlinks is installed, run it against the target directory so dangling
# symlinks get removed and the path isn't polluted by non-existent items.
if hash symlinks 2> /dev/null; then
symlinks -d $TARGETDIR
else
echo "WARNING! Executable named symlinks not found in PATH."
fi
set +x set +x