autostart-manage/autoinstall/text_command.sh

16 lines
238 B
Bash

#!/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