Here is a small script I use to download the sources for Linux compilation. Note great but saves some typing. Tested on Ubuntu. It does a full svn checkout. I was not allowed to upload it, so you need to copy the source in a textfile
To use it, copy it to a textfile "downloadNightlyBuild", and put it to the folder where you want to download the sources, Set the file permissions and run it. You might need to install subversion. This should do all this:
sudo apt install subversion
chmod 750 downloadNightlyBuild
./downloadNightlyBuild
It asks for the build number, for this it would be "12535". The checkout goes into the folder "cbNightly_2021-10-31_ref12535" as of today. If the download gets stuck, the script can be interrupted with Ctrl-C and started again. When it gives a green OK the download is done.
Shared in the hope some might find it useful.
source
#!/bin/bash
# downloadNightlyBuild
# The script downloads a nightly build of CodeBlocks from sourceforge.
# The links are not given any more at the forum, but the build number
# is sufficuent to grab the correct sources.
# use
# ./downloadNightlyBuild
# Dependencies:
# suversion must be installed: on Ubuntu use sudo apt install svn
# (c) Tigerbeard, 2021, Licence GPL
Green="tput setaf 2"
Red="tput setaf 1"
Normal="tput sgr0"
Date=`date +"%Y-%m-%d"`
echo "this downloads a codeblocks nightly build from SourceForge. "
echo " * you need to enter the build number"
echo " * the download will be saved into a the folder beside this script"
echo " * the folder name is generated automatically, existing folders"
echo " are re-used (in case the download is interrupted"
echo " * check the C::B forum page for the correct build number"
echo ""
# get build number from user
echo -n "Build number (enter to cancel): "
read BuildNumber
if [ "$BuildNumber" = "" ]; then
exit
fi
# create local target folder
TargetFolder="cbNightly_"$Date"_rev"$BuildNumber
echo " downloading CodeBlocks source build $BuildNumber to folder '$TargetFolder'..."
# if folder exists, clean up older stuck downloads
if [ -d "$TargetFolder" ]; then
echo -n " svn cleanup................................"
svn cleanup $TargetFolder 1>/dev/null 2>&1
if [ "$?" = "0" ]; then
echo "$($Green)OK$($Normal)"
else
echo "$($Red)error$($Normal)"
fi
fi
# download
echo -n " svn checkout (takes a while)..............."
svn checkout https://svn.code.sf.net/p/codeblocks/code/trunk@$BuildNumber $TargetFolder/ 1>/dev/null 2>&1
if [ "$?" = "0" ]; then
echo "$($Green)OK$($Normal)"
else
echo "$($Red)error$($Normal)"
fi
echo
echo "done"
echo