mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
Add script log for elevation scripts.
This commit is contained in:
parent
2a1127bf10
commit
6ee67769a6
25 changed files with 102 additions and 99 deletions
5
home/.chezmoiscripts/linux/run_once_after_fonts.sh
Normal file
5
home/.chezmoiscripts/linux/run_once_after_fonts.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "[INFO] Rebuilding fonts cache..."
|
||||
|
||||
fc-cache -fv
|
||||
|
|
@ -1,8 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Check if firefox is installed
|
||||
if ! command -v firefox &> /dev/null; then
|
||||
echo "[WARNING] Firefox is not installed. Skip this script."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
src=~/.dotfiles/misc/firefox/search.json.mozlz4
|
||||
dest=~/.mozilla/firefox/*.default/search.json.mozlz4
|
||||
if ! cmp -s "$src" "$dest" 2>/dev/null; then
|
||||
echo "[INFO] search.json.mozlz4 is updated, copying..."
|
||||
cp "$src" "$dest"
|
||||
fi
|
||||
|
||||
|
|
@ -11,7 +18,9 @@ fi
|
|||
src=~/.dotfiles/misc/firefox/policies.json
|
||||
dest=/etc/firefox/policies/policies.json
|
||||
if ! cmp -s "$src" "$dest" 2>/dev/null; then
|
||||
sudo cp "$src" "$dest"
|
||||
echo "[INFO] policies.json is updated, copying..."
|
||||
echo "[ACTION] elevation required"
|
||||
sudo cp "$src" "$dest" && exit 0
|
||||
fi
|
||||
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
fc-cache -fv
|
||||
Loading…
Add table
Add a link
Reference in a new issue