mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-28 18:28:35 -05:00
30 lines
547 B
Bash
Executable File
30 lines
547 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# A modified version compared to the one from the Arch Wiki
|
|
# (intended for using with Flatpak Firefox)
|
|
|
|
static=static-$1
|
|
link=$1
|
|
volatile=/dev/shm/firefox-$1-$USER
|
|
|
|
IFS=
|
|
set -efu
|
|
|
|
cd ~/.var/app/org.mozilla.firefox/.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
|