Created
May 30, 2013 11:34
-
-
Save blackhalt/5677267 to your computer and use it in GitHub Desktop.
Firefox sinhronizācija ar RAMdisku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
static=main | |
link=Firefox profils | |
volatile=/tmp/ram | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment