mirror of
https://github.com/edu4rdshl/linuxscripts.git
synced 2026-07-17 23:24:52 +00:00
Add firefox sync profile
This commit is contained in:
parent
792fb52f3a
commit
c7aad4d5c6
1 changed files with 26 additions and 0 deletions
26
user-bin/firefox-sync
Normal file
26
user-bin/firefox-sync
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
static=static-$1
|
||||||
|
link=$1
|
||||||
|
volatile=/dev/shm/firefox-$1-$USER
|
||||||
|
|
||||||
|
IFS=
|
||||||
|
set -efu
|
||||||
|
|
||||||
|
cd ~/.mozilla/firefox
|
||||||
|
|
||||||
|
if [ ! -r $volatile ]; then
|
||||||
|
mkdir -m0700 $volatile
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$(readlink $link)" != "$volatile" ]; then
|
||||||
|
mv $link $static
|
||||||
|
ln -s $volatile $link
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e $link/.unpacked ]; then
|
||||||
|
rsync -av --delete --exclude .unpacked ./$link/ ./$static/
|
||||||
|
else
|
||||||
|
rsync -av ./$static/ ./$link/
|
||||||
|
touch $link/.unpacked
|
||||||
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue