123456789101112131415161718192021222324252627282930313233 |
- #!/bin/sh --
- set -ue
- chmod3up() {
- dir="${1:?}"
- for _ in 1 2 3; do
- chmod +w -- "${dir}" || {
- dir="$(dirname "${dir}")"
- continue
- }
- return 0
- done
- return 1
- }
- inst() {
- f="${1:?}"
- d="${INSTALL_TO}/${2:?}"
- to="${d}/${f}"
- chmod3up "${d}"
- install -vDm 644 -- "${DIR}/${f}" "${to}"
- }
- : "${DIR:=${HOME}/.mozilla/kiss}"
- : "${INSTALL_TO:=${HOME}/.nix-profile/lib/firefox}"
- cd "${DIR}"
- inst policies.json distribution
- inst vendor.js browser/defaults/preferences
|