From 4068e2ad0fa2226403086456009f6810d05ac5db Mon Sep 17 00:00:00 2001 From: GhoulBoii Date: Wed, 20 Mar 2024 03:34:19 +0530 Subject: [PATCH] reverting some of my changes --- README.md | 5 ----- setup.ps1 | 10 +--------- setup.sh | 4 +--- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 10700ce..5cb1012 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,6 @@ Make sure git and Firefox is installed. ```bash -git init -git remote add origin https://github.com/ghoulboii/firefox -git fetch -git checkout origin/master -ft -git submodule update --init --recursive --remote ./setup.sh -- Linux ./setup.ps1 -- Windows ``` diff --git a/setup.ps1 b/setup.ps1 index 1c5fb2e..f0517eb 100644 --- a/setup.ps1 +++ b/setup.ps1 @@ -1,7 +1,5 @@ -# Prompt user for input $name = Read-Host -Prompt "Enter name of the firefox profile" -# Define addonlist $addonlist = @" ublock-origin, bitwarden-password-manager, @@ -12,32 +10,27 @@ windscribe, violentmonkey "@ -# Creating Profile echo "Creating Profile" Start-Process "firefox" -ArgumentList "-CreateProfile $name" -# Determine profile folder Start-Sleep 1 $folder = (Get-Content "$env:APPDATA\Mozilla\Firefox\profiles.ini" | Select-String -Pattern "Path=.*$name$" | ForEach-Object { $_ -replace 'Path=', '' }) $dir = Join-Path -Path "$env:APPDATA/Mozilla/Firefox" "$folder" cd $dir echo "Profile Creation Finished" -# Initialising Git Repo echo "Initialising Git Repo" git init git remote add origin https://github.com/ghoulboii/firefox git fetch git checkout origin/master -ft -git submodule update --init --recursive -git submodule update --recursive --remote +git submodule update --init --recursive --remote robocopy userjs . user.js prefsCleaner.bat updater.bat robocopy VerticalFox\windows\ chrome robocopy VerticalFox\sidebery\ sidebery echo "Git Repo Initialised" -# Downloading Addons echo "Downloading Addons" $addontmp = New-Item -ItemType Directory -Path "$env:TEMP\addon" -Force $mozillaurl = "https://addons.mozilla.org" @@ -49,7 +42,6 @@ $addonlist -split ',' | ForEach-Object { Invoke-WebRequest -Uri $addonurl -OutFile "$addontmp\$file" Expand-Archive -Path "$addontmp\$file" -DestinationPath "$addontmp\${file}folder" -Force $id = (Select-String -Path "$addontmp/${file}folder/manifest.json" -Pattern '"id"' -Raw | ForEach-Object { $_ -replace '\s*"id":\s*"([^"]*)"', '$1' }).Trim(',') - echo $id New-Item -ItemType Directory -Path "$dir\extensions" -ErrorAction SilentlyContinue Move-Item -Path "$addontmp\$file" -Destination "$dir\extensions\$id.xpi" -Force } diff --git a/setup.sh b/setup.sh index 3c856f7..1a38304 100755 --- a/setup.sh +++ b/setup.sh @@ -21,8 +21,7 @@ git init git remote add origin https://github.com/ghoulboii/firefox git fetch git checkout origin/master -ft -git submodule update --init --recursive -git submodule update --recursive --remote +git submodule update --init --recursive --remote cp userjs/{updater.sh,prefsCleaner.sh,user.js} . cp -r VerticalFox/{windows,sidebery} . mv windows chrome @@ -30,7 +29,6 @@ echo "Git Repo Initialised" echo "Downloading Addons" addontmp="$(mktemp -d)" -echo "doing trap" trap "rm -fr $addontmp" HUP INT QUIT TERM PWR EXIT mozillaurl="https://addons.mozilla.org" IFS=$'\n,'