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 < "$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