pdate demo program

needed a mkdir
This commit is contained in:
Joey Hess 2025-02-25 17:23:38 -04:00
parent 71e92a509a
commit f8c7cea019
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -92,16 +92,17 @@ An example `git-annex-compute-foo` shell script follows:
#!/bin/sh #!/bin/sh
set -e set -e
if [ "$1" != "convert" ]; then if [ "$1" != "convert" ]; then
echo "Usage: convert input output [passes=n]" >&2 echo "Usage: convert input output [passes=n]" >&2
exit 1 exit 1
fi fi
if [ -z "$ANNEX_COMPUTE_passes" ]; then if [ -z "$ANNEX_COMPUTE_passes" ]; then
ANNEX_COMPUTE_passes=1 ANNEX_COMPUTE_passes=1
fi fi
echo "INPUT $2" echo "INPUT $2"
read input read input
echo "OUTPUT $3" echo "OUTPUT $3"
echo REPRODUCIBLE echo REPRODUCIBLE
if [ -n "$input" ]; then if [ -n "$input" ]; then
frobnicate --passes="$ANNEX_COMPUTE_passes" <"$input" >"$3" mkdir -p "$(dirname "$3")"
frobnicate --passes="$ANNEX_COMPUTE_passes" <"$input" >"$3"
fi fi