mirror of
https://github.com/Snigdha-OS/snigdhaos-pkgbuilds.git
synced 2025-09-21 12:04:59 +02:00

Some checks are pending
Check Conventional Commit / check-commit-message (push) Waiting to run
34 lines
1.2 KiB
Plaintext
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
|