# this is meant to be sourced

if ! [ -z ${latest_versions_already_sourced+x} ]
then false calling latest-versions.sh twice
     echo calling latest-versions.sh twice
     exit 1
fi
latest_versions_already_sourced=1

if [ "$ultimatedestination" = afs ]
then
# maybe we should have a more complicated check above that allows override.sh, but for now, just modify the file locally.

ghc7_version=${ghc7_version-on-201902-21d20h07m24-0500}
ghc8bootstrap_version=${ghc8bootstrap_version-on-201905-09d07h55m09-0400}
cabal2bootstrap_version=${cabal2bootstrap_version-on-201902-25d15h16m20-0500}
cabal2_version=${cabal2_version-on-201902-26d20h58m33-0500}

buildtoolsghc_version=${buildtoolsghc_version-on-201902-23d13h42m52-0500}

# more tools needed for various stackage packages
buildtoolsmore_version=${buildtoolsmore_version-on-202002-07d12h33m26-0500}
# on-202001-28d04h02m04-0500 has proto-lens-protoc for LTS 13.x
# on-202002-07d12h33m26-0500 does not, but newer user.sh will build it.

elif [ "$ultimatedestination" = opt ]
then
ghc7_version=${ghc7_version-on-202005-03d22h18m17-0400}
ghc8bootstrap_version=${ghc8bootstrap_version-on-202005-03d23h23m20-0400}

cabal2bootstrap_version=${cabal2bootstrap_version-on-202005-04d00h16m40-0400}
cabal2_version=${cabal2_version-on-202005-04d12h47m55-0400}

buildtoolsghc_version=${buildtoolsghc_version-on-202005-04d14h00m46-0400}
buildtoolsmore_version=${buildtoolsmore_version-on-202005-04d14h13m56-0400}

else
echo ultimatedestination not set 1>&2
exit 1
fi
