Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
559 B

#!/bin/bash
source ~/.profile
if [ ! "$BROWSER" = "firefox" ]; then
exit 0
fi
source $HOME/.config/config.env
static=static-$FIREFOX_PROFILE
link=$FIREFOX_PROFILE
volatile=/dev/shm/firefox-$FIREFOX_PROFILE-$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