Files
snigdhaos-pkgbuilds/archive/snigdhaos-assistant/snigdhaos-assistant.install
CELESTIFYX 08abac9e7d
Some checks are pending
Check Conventional Commit / check-commit-message (push) Waiting to run
Refactoring repository...
2025-01-14 19:02:06 +02:00

34 lines
1.2 KiB
Plaintext

post_install() {
echo "\n[INFO] Snigdha OS Assistant successfully installed!\n"
echo "\n[INFO] Post-installation steps are being executed...\n"
# Ensure necessary directories are created
echo "[INFO] Verifying required directories..."
mkdir -p "$HOME/.snigdhaos" && echo "[OK] Directory $HOME/.snigdhaos created." || echo "[WARNING] Could not create $HOME/.snigdhaos."
# Generate a default configuration file if it does not exist
CONFIG_FILE="$HOME/.snigdhaos/assistant-config.json"
if [[ ! -f "$CONFIG_FILE" ]]; then
echo "[INFO] Creating a default configuration file at $CONFIG_FILE..."
cat <<EOL > "$CONFIG_FILE"
{
"default_applications": [
"firefox",
"code",
"vlc"
],
"auto_update": true
}
EOL
echo "[OK] Default configuration file created."
else
echo "[INFO] Configuration file already exists at $CONFIG_FILE. Skipping creation."
fi
# Inform the user of the next steps
echo "\n[INFO] Post-installation completed. You can now launch Snigdha OS Assistant using the command 'snigdhaos-assistant'."
echo "\n[INFO] For configuration, edit the file at $CONFIG_FILE."
}
post_install