Add install.sh
This commit is contained in:
32
install.sh
Normal file
32
install.sh
Normal 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."
|
||||
Reference in New Issue
Block a user