diff --git a/export-pack.sh b/export-pack.sh index e1223a5..3a90996 100755 --- a/export-pack.sh +++ b/export-pack.sh @@ -40,11 +40,21 @@ echo "# Cloning/updating MC Rebalance mod" git clone --single-branch --branch 1.21 "https://patience.nearmisses.xyz/patience/mc_rebalance.git" "${basedir}/deps/mc_rebalance" 2> /dev/null || \ (cd "${basedir}/deps/mc_rebalance"; git pull > /dev/null) +if [ $? -ne 0 ]; then + echo "Error during mod clone/update, do you have internet?" + exit 1 +fi + # Compile the mod echo "# Compiling MC Rebalance mod" rm -f "${basedir}/deps/mc_rebalance/build/libs/mc_rebalance-"*".jar" (cd "${basedir}/deps/mc_rebalance/" && ./gradlew build > /dev/null) +if [ $? -ne 0 ]; then + echo "Error during mod compilation" + exit 1 +fi + # Clean up old mod files rm -f "${basedir}/overrides/mods/mc_rebalance-"*".jar" cp "$(find "${basedir}/deps/mc_rebalance/build/libs" -regex "${basedir}/deps\/mc_rebalance\/build\/libs\/mc_rebalance-[0-9\.]+\.jar")" "${basedir}/overrides/mods" @@ -90,4 +100,5 @@ if [ $? -eq 0 ]; then echo "Successfully exported the client modpack to ${basedir}/release/MC_Rebalance_${version}.mrpack" else echo "An unknown error occured while zipping the pack" + exit 1 fi