echo"[!] I am now going to build Tahoe-LAFS, this is going to take a while. It's recommended to use this time to retrieve a beverage of your choice :)"
echo"[!] Building..."
python setup.py build >/dev/null 2>/dev/null
if[$? -ne 0];thenecho"[X] Building Tahoe-LAFS failed.";exit 1;fi
if[$? -ne 0];thenecho"[X] Building Tahoe-LAFS failed.";exit 1;exit 1;fi
echo"[+] Successfully built Tahoe-LAFS."
cd bin
if[$? -ne 0];thenecho"[X] Navigation to Tahoe-LAFS binary directory failed.";exit 1;fi
if["$(stat --format=%Y ~/.tahoe/tahoe.cfg)"==$OLDTIME];thenecho"[X] You did not save the config file, cancellation assumed and installation aborted.";exit 1;exit 1;fi
echo"[+] Configuration done."
cd ~/allmydata-tahoe-1.9.1/bin
./tahoe start >/dev/null 2>/dev/null
if[$? -ne 0];thenecho"[X] Starting the Tahoe-LAFS node failed, something went wrong.";exit 1;fi
if[$? -ne 0];thenecho"[X] Starting the Tahoe-LAFS node failed, something went wrong.";exit 1;exit 1;fi
ENDSSH
if[$? -ne 0];then
RESULT=$?
echo"$RESULT"
if[$RESULT -ne 0];then
echo"[X] An error occurred during setup, the script will now exit."