acoeur/bin/_commands/create.sh

15 lines
222 B
Bash
Executable File

#!/bin/sh
dir=$1 file=$2
page=${file%.create}
kind=$(cat "$dir/$file")
echo "Creating content/$kind/$page"
hugo --source=.. new "content/$kind/$page"
# Important to automated tests
chmod g+w "../content/$kind/$page"