pokeheartgold/files/msgdata/touch_once.sh
Abaresk 2df523fae1 Scripts should only depend on the message headers they include
Try blocking script build on a touch-once script
2023-01-03 23:11:31 +00:00

12 lines
206 B
Bash
Executable File

#!/usr/bin/env bash
# Touch a file only once when it is being created. Otherwise, do nothing.
if [ -z "$1" ]; then
echo $0: "No argument supplied"; exit 1
fi
if [ ! -f "$1" ]; then
touch "$1"
fi