Skip to content

Commit

Permalink
reverting some of my changes
Browse files Browse the repository at this point in the history
  • Loading branch information
GhoulBoii committed Mar 19, 2024
1 parent d3428f1 commit 4068e2a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
10 changes: 1 addition & 9 deletions setup.ps1
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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"
Expand All @@ -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
}
Expand Down
4 changes: 1 addition & 3 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,14 @@ 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
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,'
Expand Down

0 comments on commit 4068e2a

Please sign in to comment.