My own git-build.sh scripts
This commit is contained in:
commit
c142d2804a
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
*.log
|
||||||
|
*.err
|
||||||
|
.*/
|
1
config/hostname
Normal file
1
config/hostname
Normal file
|
@ -0,0 +1 @@
|
||||||
|
thunix.net
|
1
dnsmanager
Symbolic link
1
dnsmanager
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
zola
|
1
dnsmanager.source
Normal file
1
dnsmanager.source
Normal file
|
@ -0,0 +1 @@
|
||||||
|
https://tildegit.org/southerntofu/dnsmanager-website
|
24
git-build
Executable file
24
git-build
Executable file
|
@ -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!"
|
1
git-build.source
Normal file
1
git-build.source
Normal file
|
@ -0,0 +1 @@
|
||||||
|
https://tildegit.org/southerntofu/git-build.sh
|
1
rfc.branch
Normal file
1
rfc.branch
Normal file
|
@ -0,0 +1 @@
|
||||||
|
drafts
|
1
rfc.source
Normal file
1
rfc.source
Normal file
|
@ -0,0 +1 @@
|
||||||
|
https://tildegit.org/southerntofu/rfcs
|
1
tilde-fr.source
Normal file
1
tilde-fr.source
Normal file
|
@ -0,0 +1 @@
|
||||||
|
https://tildegit.org/tilde-fr/site
|
18
zola
Executable file
18
zola
Executable file
|
@ -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
Block a user