commit c142d2804a00f22b4899a649e83ac32a66aadf3b Author: southerntofu Date: Sat Apr 18 10:42:20 2020 -0400 My own git-build.sh scripts diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae26184 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.log +*.err +.*/ diff --git a/config/hostname b/config/hostname new file mode 100644 index 0000000..6b5084a --- /dev/null +++ b/config/hostname @@ -0,0 +1 @@ +thunix.net diff --git a/dnsmanager b/dnsmanager new file mode 120000 index 0000000..9490624 --- /dev/null +++ b/dnsmanager @@ -0,0 +1 @@ +zola \ No newline at end of file diff --git a/dnsmanager.source b/dnsmanager.source new file mode 100644 index 0000000..9994363 --- /dev/null +++ b/dnsmanager.source @@ -0,0 +1 @@ +https://tildegit.org/southerntofu/dnsmanager-website diff --git a/git-build b/git-build new file mode 100755 index 0000000..6a7e35c --- /dev/null +++ b/git-build @@ -0,0 +1,24 @@ +#!/bin/bash + +# Verify ~/bin exists +[ ! -d $HOME/bin ] && mkdir $HOME/bin + +# Add ~/bin to $PATH +grep "\$HOME/bin" $HOME/.bashrc > /dev/null +[[ $? != 0 ]] && PATH="$PATH:/$HOME/bin" + +# Wait for git-build.sh to stop running +SECONDS=0 +# TODO: make timeout configurable +echo test +while [[ $SECONDS < 60 ]]; do + if [ ! -f $GITBUILDDIR/.LOCK ]; then + # Copy the script + cp git-build.sh $HOME/bin + exit 0 + fi + sleep 5 + SECONDS=$(( SECONDS + 5 )) +done + +echo "The auto-updated script has timed out!" diff --git a/git-build.source b/git-build.source new file mode 100644 index 0000000..b512f3c --- /dev/null +++ b/git-build.source @@ -0,0 +1 @@ +https://tildegit.org/southerntofu/git-build.sh diff --git a/rfc b/rfc new file mode 120000 index 0000000..9490624 --- /dev/null +++ b/rfc @@ -0,0 +1 @@ +zola \ No newline at end of file diff --git a/rfc.branch b/rfc.branch new file mode 100644 index 0000000..2bcc92b --- /dev/null +++ b/rfc.branch @@ -0,0 +1 @@ +drafts diff --git a/rfc.source b/rfc.source new file mode 100644 index 0000000..2da013b --- /dev/null +++ b/rfc.source @@ -0,0 +1 @@ +https://tildegit.org/southerntofu/rfcs diff --git a/tilde-fr b/tilde-fr new file mode 120000 index 0000000..9490624 --- /dev/null +++ b/tilde-fr @@ -0,0 +1 @@ +zola \ No newline at end of file diff --git a/tilde-fr.source b/tilde-fr.source new file mode 100644 index 0000000..71bd2bf --- /dev/null +++ b/tilde-fr.source @@ -0,0 +1 @@ +https://tildegit.org/tilde-fr/site diff --git a/zola b/zola new file mode 100755 index 0000000..8d3814f --- /dev/null +++ b/zola @@ -0,0 +1,18 @@ +#!/bin/bash +[[ $# = 0 ]] && echo "ERROR" && exit 1 + +ARGS="" +if [ -f $GITBUILDDIR/config/hostname ]; then + base_url="https://$(cat $GITBUILDDIR/config/hostname)/~$USER/$1" + ARGS="$ARGS -u $base_url" +fi + +zola build $ARGS +if [[ $? != 0 ]]; then + echo "Building site $1 failed." + exit 2 +fi + +rm -R ~/public_html/$1 +cp -R public ~/public_html/$1 +rm -R public