My own git-build.sh scripts
This commit is contained in:
commit
c142d2804a
|
@ -0,0 +1,3 @@
|
|||
*.log
|
||||
*.err
|
||||
.*/
|
|
@ -0,0 +1 @@
|
|||
thunix.net
|
|
@ -0,0 +1 @@
|
|||
zola
|
|
@ -0,0 +1 @@
|
|||
https://tildegit.org/southerntofu/dnsmanager-website
|
|
@ -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!"
|
|
@ -0,0 +1 @@
|
|||
https://tildegit.org/southerntofu/git-build.sh
|
|
@ -0,0 +1 @@
|
|||
drafts
|
|
@ -0,0 +1 @@
|
|||
https://tildegit.org/southerntofu/rfcs
|
|
@ -0,0 +1 @@
|
|||
https://tildegit.org/tilde-fr/site
|
|
@ -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
|
Loading…
Reference in New Issue