targetable directoies are now a thing
This commit is contained in:
parent
cefa01567f
commit
b93c7e2da3
12
make.sh
12
make.sh
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
rootDir='./tmp/'
|
rootDir='./tmp/'
|
||||||
|
targetDir=''
|
||||||
|
|
||||||
[[ -z $rootDir/post/ ]] && mkdir -p $rootDir/post
|
[[ -z $rootDir/post/ ]] && mkdir -p $rootDir/post
|
||||||
|
|
||||||
@ -13,11 +14,18 @@ post() {
|
|||||||
sed -i "s/<img/<img class=\"pure-img\"/g" $tmp
|
sed -i "s/<img/<img class=\"pure-img\"/g" $tmp
|
||||||
sed -i 's/<table>/<table class="pure-table">/g' $tmp
|
sed -i 's/<table>/<table class="pure-table">/g' $tmp
|
||||||
# finally move this post to its proper location in the _rootDir
|
# finally move this post to its proper location in the _rootDir
|
||||||
mv $tmp "$rootDir/post/${base%.*}.html"
|
mv $tmp "$rootDir/$targetDir/${base%.*}.html"
|
||||||
rm -f $tmp
|
rm -f $tmp
|
||||||
}
|
}
|
||||||
|
|
||||||
target=""
|
if [[ $1 == "r" ]]
|
||||||
|
then
|
||||||
|
targetDir=''
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
targetDir='post/'
|
||||||
|
fi
|
||||||
|
|
||||||
for file in $@;do
|
for file in $@;do
|
||||||
post $file
|
post $file
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user