Initial commit
This commit is contained in:
commit
072f5fb9f0
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
variables.conf
|
||||||
|
|
15
README.md
Normal file
15
README.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Firefox profile archiving (Unix-like)
|
||||||
|
|
||||||
|
Scripts permitting to save/restore Firefox profile to/from a defined location.
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
* `p7zip`
|
||||||
|
|
||||||
|
### Files
|
||||||
|
* `firefox-save.sh` performs a save of you Firefox profile.
|
||||||
|
* `firefox-load.sh` restores a save of you Firefox profile.
|
||||||
|
#### Installation
|
||||||
|
* `bashrc-ffarchiving` adds aliases to your shell prompt to call above scripts.
|
||||||
|
* `install.sh` copies `bashrc-ffarchiving` to bashrc extension directory with correct paths.
|
||||||
|
|
||||||
|
### TODO
|
12
firefox-load.sh
Executable file
12
firefox-load.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# The purpose of this script is to install a Firefox profile from a save location.
|
||||||
|
|
||||||
|
source "$(dirname "$0")/variables.conf"
|
||||||
|
|
||||||
|
# Remove current profile
|
||||||
|
rm -r $firefox_data_path/$profile_name
|
||||||
|
|
||||||
|
# Install profile
|
||||||
|
7z x $local_path/$file_name -o$firefox_data_path
|
||||||
|
|
||||||
|
exit 0
|
12
firefox-save.sh
Executable file
12
firefox-save.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# The purpose of this script is to zip a Firefox profile and stash it to a save location.
|
||||||
|
|
||||||
|
source "$(dirname "$0")/variables.conf"
|
||||||
|
|
||||||
|
# Remove old archive
|
||||||
|
rm $local_path/$file_name
|
||||||
|
|
||||||
|
# Save profile
|
||||||
|
7z a $local_path/$file_name $firefox_data_path/$profile_name
|
||||||
|
|
||||||
|
exit 0
|
11
install.sh
Executable file
11
install.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
run_directory=$(dirname "$0")
|
||||||
|
$user=$(whoami)
|
||||||
|
|
||||||
|
echo "Copying bashrc-ffarchiving to extensions directory..."
|
||||||
|
cp $run_directory/templates/bashrc-ffarchiving /home/$user/.bashrc.d/
|
||||||
|
sed -i -e "s:PH_DIRECTORY:$run_directory:g" /home/$user/.bashrc.d/bashrc-ffarchiving
|
||||||
|
|
||||||
|
echo "Finished install. Exiting..."
|
||||||
|
exit 0
|
7
templates/bashrc-ffarchiving
Normal file
7
templates/bashrc-ffarchiving
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# ~/.bashrc.d/bashrc-ffarchiving
|
||||||
|
# byMasterKTO
|
||||||
|
|
||||||
|
# Set Firefox profile archiving aliases
|
||||||
|
alias ff-load='PH_DIRECTORY/firefox-load.sh'
|
||||||
|
alias ff-save='PH_DIRECTORY/firefox-save.sh'
|
6
variables.conf.template
Normal file
6
variables.conf.template
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
file_name='profile.zip'
|
||||||
|
local_path="" # Set your "repository" here
|
||||||
|
firefox_data_path="$HOME/.mozilla/firefox"
|
||||||
|
profile_name='profile'
|
Loading…
Reference in New Issue
Block a user