#!/bin/bash # # Description : Easy install PiKISS # Author : Jose Cerrejon Gonzalez (ulysess@gmail_dot._com) # Version : 1.0.10 (14/Nov/23) # clear readonly INSTALL_DIR="$HOME" readonly PIKISS_URL="https://github.com/jmcerrejon/PiKISS.git" make_desktop_entry() { if [[ ! -e "$HOME"/.local/share/applications/pikiss.desktop ]]; then echo -e "[Desktop Entry]\nName=PiKISS\nComment=A bunch of scripts with menu to make your life easier\nExec=${PWD}/piKiss.sh\nIcon=${PWD}/icons/pikiss_32.png\nTerminal=true\nType=Application\nCategories=ConsoleOnly;Utility;System;\nPath=${PWD}/" >"$HOME"/.local/share/applications/pikiss.desktop if [[ -e /usr/bin/lxpanelctl ]]; then echo -e "\nRestarting LXPanel..." lxpanelctl restart &>/dev/null fi fi } check_and_install_dialog() { if ! [ -x "$(command -v dialog)" ]; then read -p "Dialog pkg is not installed and you need it for PiKISS. Do you want to install it? (y/N) " response if [[ $response =~ [Yy] ]]; then sudo apt install -y dialog else echo "Aborting..." exit 1 fi fi } is_piapps_installed() { if [[ $(whereis pi-apps) ]]; then true else false fi } if [[ -d "$INSTALL_DIR/piKiss" ]]; then check_and_install_dialog cd "$INSTALL_DIR/piKiss" && ./piKiss.sh exit 0 fi install() { if ! grep -q System Tools > PiKISS " if ! is_piapps_installed; then read -p "Press ENTER to run PiKISS." cd "${INSTALL_DIR}/piKiss" || exit 1 ./piKiss.sh fi