summaryrefslogtreecommitdiff
path: root/localbackupiceweaselprofile
blob: 2aa484e4169f100f0b8ed3101b17fff87773903f (plain)
  1. #!/bin/sh
  2. set -e
  3. # Based on script by Micah Anderson <micah@riseup.net>
  4. CFGFILE="{CFGFILE:-${HOME}/.backupiceweaselprofile}"
  5. if -f "$CFGFILE"; then
  6. . "$CFGFILE"
  7. fi
  8. MOZDIR="${MOZDIR:-${HOME}/.mozilla/firefox}"
  9. # Change this to match your correct profile
  10. PROFILE="${PROFILE:-8xrm3et5.default}"
  11. if test -z "$(mount | grep -F "${MOZDIR}/${PROFILE}" )"; then
  12. mount "${MOZDIR}/${PROFILE}"
  13. fi
  14. if test -f "${MOZDIR}/${PROFILE}/.unpacked"; then
  15. rsync -av --delete --exclude .unpacked "${MOZDIR}/${PROFILE}/" "${MOZDIR}/profile/"
  16. else
  17. rsync -av "${MOZDIR}/profile/" "${MOZDIR}/$PROFILE/"
  18. touch "${MOZDIR}/${PROFILE}/.unpacked"
  19. fi