git-build updates git-build plz
This commit is contained in:
parent
f8b1e2a20f
commit
417a8ff6d0
|
@ -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
|
Loading…
Reference in New Issue