Compare commits
5 Commits
7a89c17953
...
a13d4dd824
Author | SHA1 | Date | |
---|---|---|---|
a13d4dd824 | |||
d76595456f | |||
b7433a1021 | |||
ac32959add | |||
6568c8e96d |
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,6 +1,2 @@
|
||||
# ignore generated site
|
||||
output/
|
||||
|
||||
# Ignore compiled files
|
||||
blog/templates/index.html/header.html
|
||||
blog/templates/index.html/footer.html
|
||||
|
14
phpsg.sh
14
phpsg.sh
@ -43,28 +43,24 @@ do
|
||||
exit
|
||||
;;
|
||||
*)
|
||||
>&2 echo "Unknown option '-$opt'."
|
||||
print_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for dir in $(find $SOURCE_DIR -mindepth 1 -type d)
|
||||
while IFS= read -r -d '' dir
|
||||
do
|
||||
OUT_DIR="${OUTPUT_DIR}/${dir:${#SOURCE_DIR}}"
|
||||
if ! [ -d "$OUT_DIR" ]
|
||||
then
|
||||
mkdir -p "${OUTPUT_DIR}/${dir:${#SOURCE_DIR}}"
|
||||
fi
|
||||
done
|
||||
done < <(find "$SOURCE_DIR" -mindepth 1 -type d -print0)
|
||||
|
||||
for file in $(find $SOURCE_DIR -type f)
|
||||
while IFS= read -r -d '' file
|
||||
do
|
||||
if [[ $file = *.cfg.php ]]
|
||||
then
|
||||
continue
|
||||
elif [[ $file = *.html.php ]] || [[ $file = *.xml.php ]]
|
||||
if [[ $file = *.php ]]
|
||||
then
|
||||
DEST_FILE="${OUTPUT_DIR}/${file:${#SOURCE_DIR}:-4}"
|
||||
if ! [ "$file" -nt "$DEST_FILE" ]
|
||||
@ -84,4 +80,4 @@ do
|
||||
cp "$file" "$DEST_FILE"
|
||||
echo "done"
|
||||
fi
|
||||
done
|
||||
done < <(find "$SOURCE_DIR" -type f -not -name '*.cfg.php' -print0)
|
||||
|
@ -36,10 +36,6 @@ to encrypt your e-mails following their very simple instructions.</p>
|
||||
<li><a href="ircs://irc.libera.chat:6697/gnu" >#gnu</a></li>
|
||||
<li><a href="ircs://irc.libera.chat:6697/gnu-offtopic" >#gnu-offtopic</a></li>
|
||||
</ul>
|
||||
<li>irc.oftc.net</li>
|
||||
<ul>
|
||||
<li><a href="ircs://irc.oftc.net:6697/debian" >#debian</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<?php
|
||||
|
Loading…
x
Reference in New Issue
Block a user