autostart-manage/autoinstall/text_command.sh

17 lines
238 B
Bash
Raw Normal View History

2024-01-09 15:48:11 +00:00
#!/usr/bin/env bash
target=${args[target]:?}
text=${args[text]:?}
if [ ! -f "$target" ]
then
echo "Installing text '$text' to $target"
target_dir=$(dirname "$target")
mkdir -p "$target_dir"
echo "$text" > "$target"
_run_hook
fi