diff --git a/bedrock-linux-99.99.99-x86_64.sh b/bedrock-linux-99.99.99-x86_64.sh index 35859d7..b6f9560 100644 --- a/bedrock-linux-99.99.99-x86_64.sh +++ b/bedrock-linux-99.99.99-x86_64.sh @@ -1,44 +1,37 @@ #!/bedrock/libexec/busybox sh . /bedrock/share/common-code - -if which brl > /dev/null 2>&1; then - echo "Fetching latest commits from repository..." - if [ -d /bedrock/cache/bedrocklinux-userland ]; then - less_lethal_rm_rf /bedrock/cache/bedrocklinux-userland +echo "Fetching latest commits from repository..." +if [ -d /bedrock/cache/bedrocklinux-userland ]; then + less_lethal_rm_rf /bedrock/cache/bedrocklinux-userland +fi + mkdir -p /bedrock/cache + cd /bedrock/cache + git clone https://github.com/bedrocklinux/bedrocklinux-userland + cd bedrocklinux-userland + git checkout 0.7 -q +fi +current_version="$(awk '{print$3}' Makefile-new - mv Makefile-new Makefile - fi - make SKIPSIGN=true -j $(nproc) BEDROCK_VERSION="${newest_version}" - /bedrock/libexec/busybox sh "bedrock-linux-${newest_version}-$(uname -m).sh" --force-update - # Maybe clean up here in the future else - echo "Bedrock Linux is not installed!" - return + echo "Building Bedrock Linux version ${newest_version}" +fi +# Start the build process +make clean +if ! grep -q BEDROCK_VERSION Makefile; then # Fix bug with building BusyBox + sed 's/VERSION/BEDROCK_VERSION/g' Makefile > Makefile-new + mv Makefile-new Makefile fi -exit_success +make SKIPSIGN=true -j $(nproc) BEDROCK_VERSION="${newest_version}" +/bedrock/libexec/busybox sh "bedrock-linux-${newest_version}-$(uname -m).sh" --force-update +# Maybe clean up here in the future +exit_success \ No newline at end of file