Trims fat and renames files
This commit is contained in:
parent
6021ad3194
commit
4563550969
40 changed files with 233 additions and 352 deletions
15
launchd_scripts/process_files.sh
Executable file
15
launchd_scripts/process_files.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# This script processes certain files and replaces
|
||||
# {{<IDENTIFIER>}} with the entries in vars.json
|
||||
|
||||
output_path="./watch_volumes.plist"
|
||||
template_file="watch_volumes.plist.tpl"
|
||||
usb_drive_path=$(jq < ./vars.json '.USB_DRIVE_PATH' | \
|
||||
sed 's/\//\\\//g' | sed 's/"//g')
|
||||
|
||||
cat "$template_file" | perl -p -e 's/(\{\{[^}]+\}\})/'$usb_drive_path'/g' \
|
||||
>"$output_path"
|
||||
|
||||
echo "Done."
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue