on Airdrop Download trigger
This commit is contained in:
16
trigger/trigger.sh
Executable file
16
trigger/trigger.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
SCRIPTS_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
|
||||
default_disk_path="${HOME}/Downloads"
|
||||
|
||||
for script in "$SCRIPTS_DIR"/on*.sh; do
|
||||
[ -f "$script" ] || continue
|
||||
script_name="$(basename "$script")"
|
||||
|
||||
case "$script_name" in
|
||||
onSD_DANSEMount.sh) disk_path="/Volumes/SD_DANSE" ;;
|
||||
*) disk_path="$default_disk_path" ;;
|
||||
esac
|
||||
|
||||
"$SCRIPTS_DIR/registerApp.sh" "$script" "$disk_path"
|
||||
done
|
||||
Reference in New Issue
Block a user