summaryrefslogtreecommitdiff
path: root/.install/aetherfox
diff options
context:
space:
mode:
authorbh <qn+git@epicurus.dev>2026-03-23 21:13:41 +0800
committerbh <qn+git@epicurus.dev>2026-03-23 21:13:41 +0800
commitfd1067b9434b3a161cbd09e0cbffa23151c4c279 (patch)
tree21d99573b04605bc870812f8f397bc5149afb902 /.install/aetherfox
parent5bca208b0cd31d32cf09a5681dc0e320851cd28d (diff)
Fix location of install scripts
Diffstat (limited to '.install/aetherfox')
-rwxr-xr-x.install/aetherfox41
1 files changed, 41 insertions, 0 deletions
diff --git a/.install/aetherfox b/.install/aetherfox
new file mode 100755
index 0000000..722560c
--- /dev/null
+++ b/.install/aetherfox
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+FIREFOX_DIR="${HOME}/.mozilla/firefox"
+REPO_URL="https://github.com/QuixoticNapoleon/AetherFox"
+
+if [[ ! -d "$FIREFOX_DIR" ]]; then
+ echo "Firefox profile directory not found: $FIREFOX_DIR" >&2
+ exit 1
+fi
+
+profile_dir=""
+
+shopt -s nullglob
+profiles=( "$FIREFOX_DIR"/*.default-release )
+shopt -u nullglob
+
+if (( ${#profiles[@]} == 0 )); then
+ echo "No Firefox .default-release profile found in $FIREFOX_DIR" >&2
+ exit 1
+fi
+
+profile_dir="${profiles[0]}"
+chrome_dir="${profile_dir}/chrome"
+
+mkdir -p "$chrome_dir"
+
+if [[ -d "$chrome_dir/.git" ]]; then
+ echo "Git repository already exists in: $chrome_dir"
+ exit 0
+fi
+
+echo "No git repository found in: $chrome_dir"
+echo "Removing existing contents..."
+
+find "$chrome_dir" -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +
+
+echo "Cloning AetherFox into: $chrome_dir"
+git clone "$REPO_URL" "$chrome_dir"
+
+echo "Done."