Don't mess around with the ~/.forgebuild dir

This commit is contained in:
southerntofu 2020-09-23 16:13:58 -04:00
parent 71b77d90df
commit aaa2d8bd72
1 changed files with 7 additions and 11 deletions

View File

@ -281,16 +281,12 @@ function setup_submodule {
}
@test "can run with ~/.forgebuild" {
if [ -d $HOME/.forgebuild ]; then
NEWDIR="$(mktemp -d)"
mv $HOME/.forgebuild $NEWDIR;
fi
ln -s $FORGEBUILDDIR $HOME/.forgebuild
$FORGEBUILD time
[ -f /tmp/forgebuild-time ]
rm $HOME/.forgebuild
if [ ! -z $NEWDIR ]; then
mv $NEWDIR/.forgebuild $HOME
rmdir $NEWDIR
if [ ! -d $HOME/.forgebuild ]; then
mkdir $HOME/.forgebuild
fi
cp $FORGEBUILDDIR/time $HOME/.forgebuild/TESTtime
cp $FORGEBUILDDIR/time.source $HOME/.forgebuild/TESTtime.source
$FORGEBUILD TESTtime
rm $HOME/.forgebuild/TESTtime*
rm -rf $HOME/.forgebuild/.TESTtime
}