#!/bin/sh mkdir -p ~/.firefoxcache arg=$1 acstate="/proc/acpi/ac_adapter/ADP1/state" if [ "$arg" == "boot" ]; then # echo "firefoxcache to shm" rsync -a ~/.firefoxcache/ /dev/shm/Cache/ else if grep -q on-line $acstate then # echo "shm to firefoxcache" rsync -a --delete /dev/shm/Cache/ ~/.firefoxcache/ fi fi