Changed a = to a == for a comparison

This commit is contained in:
Julian Hahn 2026-02-25 11:46:01 +01:00
parent e147522141
commit 3794413541
2 changed files with 22 additions and 16 deletions

36
install.sh Normal file → Executable file
View File

@ -1,25 +1,31 @@
#! /bin/bash
# fact checking
PATH="$(pwd)"
USER="$(stat -c '%U' $PATH/lamapolldsgvo.desktop)"
PATH="$(/usr/bin/pwd)"
echo $PATH
USER="$(/usr/bin/stat -c '%U' $PATH/lamapolldsgvo.desktop)"
echo $USER
# install .desktop file
install -m 644 $PATH/lamapolldsgvo.desktop -o root -g root /usr/share/applications/lamapolldsgvo.desktop
#cp $PATH/lamapolldsgvo.desktop /usr/share/applications/lamapolldsgvo.desktop
#chown root:root /usr/share/applications/lamapolldsgvo.desktop
#chmod 644 /usr/share/applications/lamapolldsgvo.desktop
/usr/bin/install -m 644 $PATH/lamapolldsgvo.desktop -o root -g root /usr/share/applications/lamapolldsgvo.desktop
# install actual script
install -m 775 $PATH/lamapoll-DSGVO.sh -o root -g root /usr/local/bin/lamapoll-DSGVO.sh
#cp $PATH/lamapoll-DSGVO.sh /usr/local/bin/lamapoll-DSGVO.sh
#chown root:root /usr/local/bin/lamapoll-DSGVO.sh
#chmod 775 /usr/local/bin/lamapoll-DSGVO.sh
/usr/bin/install -m 775 $PATH/lamapoll-DSGVO.sh -o root -g root /usr/local/bin/lamapoll-DSGVO.sh
# install link into start menu
sudo -u $USER "desktop-file-install --dir=/home/$USER/.local/share/applications /usr/share/applications/lamapoll-dsgvo.desktop"
sudo -u $USER "update-desktop-database -v ~/.local/share/applications"
/usr/bin/sudo -u $USER desktop-file-install --dir=/home/$USER/.local/share/applications /usr/share/applications/lamapolldsgvo.desktop
/usr/bin/sudo -u $USER update-desktop-database -v /home/$USER/.local/share/applications
echo "Installation done."
echo "Installation done."
/usr/bin/rm -f /tmp/api.keys 2>&1 >/dev/null
/usr/bin/touch /tmp/api.keys
/usr/bin/chown $USER:$USER /tmp/api.keys
MORE="y"
while [ $MORE == "y" ]; do
read -p "Bitte API Key eingeben: " API
API=${API:-}
echo $API >> /tmp/api.keys
read -p "Weitere API Keys eingeben? [y/N] " MORE
MORE=${MORE:-N}
done

View File

@ -1,6 +1,6 @@
#! /bin/bash
file_path="/tmp/api.keys"h
file_path="/tmp/api.keys"
if ! test -f $file_path; then
echo "Keine API Keys gefunden. Bitte eine 'api.keys' Datei in /tmp/ ablegen"