summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarlonivo <email@marlonivo.xyz>2024-08-12 01:47:48 +0000
committermarlonivo <email@marlonivo.xyz>2024-08-12 01:47:48 +0000
commit6fc08940cad5912089407068b34232340d386b06 (patch)
treea582ada969826e7acd4ee894421cb33c4dbf0e0b
parent6d6805c9b718a08e9eb6ce41b0667789b891c686 (diff)
Update
-rw-r--r--.makefile.kate-swpbin84 -> 0 bytes
-rw-r--r--install.sh43
-rw-r--r--makefile49
3 files changed, 48 insertions, 44 deletions
diff --git a/.makefile.kate-swp b/.makefile.kate-swp
deleted file mode 100644
index 25821b5..0000000
--- a/.makefile.kate-swp
+++ /dev/null
Binary files differ
diff --git a/install.sh b/install.sh
new file mode 100644
index 0000000..cdc3214
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# Makefile für das unifox.js Projekt
+PROFILE_NAME="unifox"
+PROFILE_DIR=$(HOME)/.mozilla/firefox
+
+# Neues Profil erstellen
+firefox -CreateProfile "$PROFILE_NAME"
+
+# Pfad des neuen Profils ermitteln
+NEW_PROFILE_PATH=$(grep -oP "(?<=^Path=).*$" "$PROFILE_DIR/profiles.ini" | grep "$PROFILE_NAME")
+
+# Notwendige Verzeichnisse erstellen
+mkdir -p "$PROFILE_DIR/$NEW_PROFILE_PATH/chrome"
+mkdir -p "$PROFILE_DIR/$NEW_PROFILE_PATH/chrome/img"
+
+# Konfigurationsdateien kopieren
+cp -r chrome "$PROFILE_DIR/$NEW_PROFILE_PATH/"
+cp prefs.js "$PROFILE_DIR/$NEW_PROFILE_PATH/"
+cp addons.json "$PROFILE_DIR/$NEW_PROFILE_PATH/"
+
+# Add-ons installieren und konfigurieren
+ADDON_LIST="ublock-origin decentraleyes istilldontcareaboutcookies vimimium-c"
+ADDON_TMP=$(mktemp -d)
+for ADDON in $ADDON_LIST; do
+ if [ "$ADDON" = "ublock-origin" ]; then
+ ADDON_URL=$(curl -sL https://api.github.com/repos/gorhill/uBlock/releases/latest | grep -E 'browser_download_url.*\.firefox\.xpi' | cut -d '"' -f 4)
+ else
+ ADDON_URL=$(curl --silent "https://addons.mozilla.org/en-US/firefox/addon/$ADDON/" | grep -o 'https://addons.mozilla.org/firefox/downloads/file/[^"]*')
+ fi
+ FILE=$(basename "$ADDON_URL")
+ curl -LOs "$ADDON_URL" -o "$ADDON_TMP/$FILE"
+ ID=$(unzip -p "$ADDON_TMP/$FILE" manifest.json | grep "\"id\"" | sed 's/\"//g')
+ mv "$ADDON_TMP/$FILE" "$PROFILE_DIR/$NEW_PROFILE_PATH/extensions/$ID.xpi"
+done
+
+# Hintergrundbild kopieren
+cp /path/to/custom/background.png "$PROFILE_DIR/$NEW_PROFILE_PATH/chrome/img/background.png"
+
+# Finale Konfiguration
+echo "user_pref('toolkit.legacyUserProfileCustomizations.stylesheets', true);" >> "$PROFILE_DIR/$NEW_PROFILE_PATH/prefs.js"
+
+echo "Firefox setup for profile $PROFILE_NAME completed."
diff --git a/makefile b/makefile
index 6b63224..4fdc242 100644
--- a/makefile
+++ b/makefile
@@ -1,52 +1,13 @@
# Makefile für das unifox.js Projekt
-# Variablen
-PROFILE_NAME="unifox"
-PROFILE_DIR=$(HOME)/.mozilla/firefox
-
# Ziel: alles
all: setup
# Ziel: setup
setup:
- # Neues Profil erstellen
- firefox -CreateProfile $(PROFILE_NAME)
-
- # Pfad des neuen Profils ermitteln
- NEW_PROFILE_PATH=$(shell grep -oP "(?<=^Path=).*$" $(PROFILE_DIR)/profiles.ini | grep $(PROFILE_NAME))
-
- # Notwendige Verzeichnisse erstellen
- mkdir -p $(PROFILE_DIR)/$(NEW_PROFILE_PATH)/chrome
- mkdir -p $(PROFILE_DIR)/$(NEW_PROFILE_PATH)/chrome/img
-
- # Konfigurationsdateien kopieren
- cp -r chrome $(PROFILE_DIR)/$(NEW_PROFILE_PATH)/
- cp prefs.js $(PROFILE_DIR)/$(NEW_PROFILE_PATH)/
- cp addons.json $(PROFILE_DIR)/$(NEW_PROFILE_PATH)/
-
- # Add-ons installieren und konfigurieren
- $(MAKE) install_addons
-
- # Hintergrundbild kopieren
- cp /path/to/custom/background.png $(PROFILE_DIR)/$(NEW_PROFILE_PATH)/chrome/img/background.png
-
- # Finale Konfiguration
- echo "user_pref('toolkit.legacyUserProfileCustomizations.stylesheets', true);" >> $(PROFILE_DIR)/$(NEW_PROFILE_PATH)/prefs.js
-
- @echo "Firefox setup for profile $(PROFILE_NAME) completed."
+ git clone https://github.com/your/repository.git
+ cd repository
+ chmod +x install.sh
+ ./install.sh
-# Ziel: Add-ons installieren
-install_addons:
- ADDON_LIST="ublock-origin decentraleyes istilldontcareaboutcookies vimimium-c"
- ADDON_TMP=$(shell mktemp -d)
- for ADDON in $(ADDON_LIST); do \
- if [ "$$ADDON" = "ublock-origin" ]; then \
- ADDON_URL=$$(curl -sL https://api.github.com/repos/gorhill/uBlock/releases/latest | grep -E 'browser_download_url.*\.firefox\.xpi' | cut -d '"' -f 4); \
- else \
- ADDON_URL=$$(curl --silent "https://addons.mozilla.org/en-US/firefox/addon/$$ADDON/" | grep -o 'https://addons.mozilla.org/firefox/downloads/file/[^"]*'); \
- fi \
- FILE=$$(basename "$$ADDON_URL"); \
- curl -LOs "$$ADDON_URL" -o "$$ADDON_TMP/$$FILE"; \
- ID=$$(unzip -p "$$ADDON_TMP/$$FILE" manifest.json | grep "\"id\"" | sed 's/\"//g'); \
- mv "$$ADDON_TMP/$$FILE" $(PROFILE_DIR)/$(NEW_PROFILE_PATH)/extensions/$$ID.xpi; \
- done
+@echo "Setup completed."