Skip to content

Instantly share code, notes, and snippets.

@blackhalt
Created May 30, 2013 11:34
Show Gist options
  • Save blackhalt/5677267 to your computer and use it in GitHub Desktop.
Save blackhalt/5677267 to your computer and use it in GitHub Desktop.
Firefox sinhronizācija ar RAMdisku
#!/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