bad commit
This commit is contained in:
parent
da37523245
commit
ceee7e85f9
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -f config.sh ]; then
|
||||
. config.sh
|
||||
fi
|
||||
|
||||
if [ -z "$POSTS_DIR" ]
|
||||
then
|
||||
echo "POSTS_DIR environment variable is unset." > /dev/stderr
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ -z "$ASSETS_DIR" ]
|
||||
then
|
||||
echo "ASSETS_DIR environment variable is unset." > /dev/stderr
|
||||
exit 2
|
||||
fi
|
||||
|
||||
rc=0
|
||||
sed -rn 's|^.*\!\[.*\]\(%assets_url%/(.*)\)$|\1|p' $POSTS_DIR/* | while read line
|
||||
do
|
||||
if [ ! -f "$ASSETS_DIR/$line" ]
|
||||
then
|
||||
echo "$line not found"
|
||||
rc=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $rc
|
|
@ -0,0 +1,2 @@
|
|||
POSTS_DIR="../content/posts"
|
||||
ASSETS_DIR="../assets"
|
|
@ -1,6 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
POSTS_DIR="content/posts"
|
||||
if [ -f config.sh ]; then
|
||||
. config.sh
|
||||
fi
|
||||
|
||||
if [ -z "$POSTS_DIR" ]
|
||||
then
|
||||
echo "POSTS_DIR environment variable is unset." > /dev/stderr
|
||||
exit 2
|
||||
fi
|
||||
|
||||
cd $POSTS_DIR
|
||||
for post in *
|
Loading…
Reference in New Issue