Add install.sh

This commit is contained in:
2025-09-14 17:39:27 +02:00
parent 8db74750f9
commit 6a690f0374

32
install.sh Normal file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
# Installation script for ThunderPing
set -e
APPDIR="$HOME/.local/share/thunderping"
CONFIGDIR="$HOME/.config/thunderping"
mkdir -p "$APPDIR"
mkdir -p "$CONFIGDIR"
cp src/applet.py "$APPDIR/"
cp src/generate_config.py "$APPDIR/"
cp img/ThunderPing.png "$APPDIR/"
chmod +x "$APPDIR/applet.py"
# Copy translations if they exist
if [ -d "locale" ]; then
cp -r locale "$APPDIR/"
echo "Translations copied"
fi
# Generate config.json automatically
python3 "$APPDIR/generate_config.py"
cat << EOF > "$HOME/.local/share/applications/thunderping.desktop"
[Desktop Entry]
Type=Application
Name=ThunderPing
Exec=python3 $APPDIR/applet.py
Icon=$APPDIR/ThunderPing.png
Comment=Monitor for Thunderbird unread emails
Categories=Utility;
EOF
echo "ThunderPing installation completed. You can start the applet from the Applications menu."