This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/dotfiles/scripts/create-application

25 lines
406 B
Bash
Executable file

#!/bin/sh
testz() {
if test -z "$1"; then
echo "$2" >&2
exit 1
fi
}
testz "$DOTDROP_CONFIG" "DOTDROP_CONFIG is not set"
testz "$1" "No application name provided"
pushd "$(dirname "$DOTDROP_CONFIG")"
cat > "dotfiles/scripts/$1.desktop" <<EOF
[Desktop Entry]
Name=$1
Comment=Edit text files
Exec=$1
Type=Application
Icon=system.desktop
Categories=Utility;
StartupNotify=false
EOF