#!/bin/sh # Adds VibEdit to your applications menu. Run it again after moving this # folder; "./install.sh --uninstall" removes the menu entry. set -eu dir=$(cd "$(dirname "$0")" && pwd) apps=${XDG_DATA_HOME:-$HOME/.local/share}/applications entry=$apps/vibedit.desktop if [ "${1:-}" = "--uninstall" ]; then rm -f "$entry" echo "Removed $entry" exit 0 fi # These would need escaping in the desktop entry's Exec line. case $dir in *[\"\`\$\\]*) echo "Move this folder to a path without \" \` \$ or \\ in it, then run install.sh again." >&2 exit 1 ;; esac mkdir -p "$apps" cat > "$entry" </dev/null 2>&1; then update-desktop-database -q "$apps" || true fi echo "Added VibEdit to your applications menu ($entry)"