Skip to content

Instantly share code, notes, and snippets.

@ernstki
Last active November 23, 2024 19:16
Show Gist options
  • Save ernstki/aae9e045369b48b517487c7e6694808d to your computer and use it in GitHub Desktop.
Save ernstki/aae9e045369b48b517487c7e6694808d to your computer and use it in GitHub Desktop.
Create symlinks in your ~/bin for Flatpak apps, with sensible names
#
# to use this, type `make -f zz_Makefile`
# because https://github.com/orgs/community/discussions/86555
#
help:
@echo "Type 'make install' to edit the list of links, then install to your ~/bin directory." >&2;
install: flatpak-link edit
@if ! echo "$$PATH" | tr : \\n | grep -qF "$$HOME/bin"; then \
echo "NOTE: Your ~/bin directory is not in the PATH. You may just need to" >&2; \
echo " log out and back in (or '. ~/.{bash_,}profile') to fix this." >&2; \
fi
install -m755 $< ~/bin
~/bin/$<
edit: flatpak-link
$${EDITOR:-nano} $<
# vim: ft=make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment