From 612e134e4fd0804efb1ddc7094a0c224e4171c21 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Wed, 4 Jan 2017 16:53:18 +0300 Subject: [PATCH] Differentiate between stable and nightly images --- build-all.sh | 2 +- compile.sh | 8 ++++---- main.sh | 6 ++++++ makeboarddeb.sh | 1 + scripts/check_first_login.sh | 10 +++++++++- scripts/update-motd.d/10-header | 2 +- 6 files changed, 22 insertions(+), 7 deletions(-) diff --git a/build-all.sh b/build-all.sh index 5296329e07..a724ada3e9 100644 --- a/build-all.sh +++ b/build-all.sh @@ -201,7 +201,7 @@ for line in "${buildlist[@]}"; do CPUMIN CPUMAX UBOOT_VER KERNEL_VER GOVERNOR BOOTSIZE UBOOT_TOOLCHAIN KERNEL_TOOLCHAIN PACKAGE_LIST_EXCLUDE KERNEL_IMAGE_TYPE \ write_uboot_platform family_tweaks setup_write_uboot_platform BOOTSCRIPT UBOOT_TARGET_MAP LOCALVERSION UBOOT_COMPILER KERNEL_COMPILER \ MODULES MODULES_NEXT MODULES_DEV INITRD_ARCH HAS_UUID_SUPPORT BOOTENV_FILE BOOTDELAY MODULES_BLACKLIST MODULES_BLACKLIST_NEXT \ - MODULES_BLACKLIST_DEV MOUNT SDCARD BOOTPATCHDIR buildtext RELEASE UBOOT_ALT_GCC KERNEL_ALT_GCC + MODULES_BLACKLIST_DEV MOUNT SDCARD BOOTPATCHDIR buildtext RELEASE UBOOT_ALT_GCC KERNEL_ALT_GCC IMAGE_TYPE read BOARD BRANCH RELEASE BUILD_DESKTOP <<< $line n=$[$n+1] diff --git a/compile.sh b/compile.sh index 390039c156..31c5c5298b 100755 --- a/compile.sh +++ b/compile.sh @@ -26,14 +26,14 @@ DEST_LANG="en_US.UTF-8" # sl_SI.UTF-8, en_US.UTF-8 KERNEL_KEEP_CONFIG="no" # do not overwrite kernel config before compilation EXTERNAL="yes" # build and install extra applications and drivers EXTERNAL_NEW="prebuilt" # compile and install or install prebuilt additional packages -CREATE_PATCHES="no" # wait that you make changes to uboot and kernel source and creates patches +CREATE_PATCHES="no" # wait that you make changes to uboot and kernel source and creates patches FORCE_CHECKOUT="yes" # ignore manual changes to source BUILD_ALL="no" # cycle through available boards and make images or kernel/u-boot packages. # set KERNEL_ONLY to "yes" or "no" to build all packages/all images -BETA="" # set yes to add subrevision with tomorrow's date. For internal use. -MULTITHREAD="" # build n images at once. For internal use. - +BETA="" # set yes to add subrevision with tomorrow's date. For internal use. +MULTITHREAD="" # build n images at once. For internal use. + # build script version to use LIB_TAG="" # empty for latest version, # one of listed here: https://github.com/igorpecovnik/lib/tags for stable versions, diff --git a/main.sh b/main.sh index ea7ab16c4f..2aaf067af4 100644 --- a/main.sh +++ b/main.sh @@ -65,6 +65,12 @@ for i in "$@"; do fi done +if [[ $BETA == yes ]]; then + IMAGE_TYPE=nightly +else + IMAGE_TYPE=stable +fi + if [[ $PROGRESS_DISPLAY == none ]]; then OUTPUT_VERYSILENT=yes elif [[ $PROGRESS_DISPLAY != plain ]]; then diff --git a/makeboarddeb.sh b/makeboarddeb.sh index b0bfaf5975..8824fd9744 100644 --- a/makeboarddeb.sh +++ b/makeboarddeb.sh @@ -125,6 +125,7 @@ create_board_package() LINUXFAMILY=$LINUXFAMILY BRANCH=$BRANCH ARCH=$ARCHITECTURE + IMAGE_TYPE=$IMAGE_TYPE EOF # temper binary for USB temp meter diff --git a/scripts/check_first_login.sh b/scripts/check_first_login.sh index 6e572dc963..b1190a1a04 100644 --- a/scripts/check_first_login.sh +++ b/scripts/check_first_login.sh @@ -1,8 +1,16 @@ #!/bin/bash # only do this for interactive shells + +. /etc/armbian-release + if [ "$-" != "${-#*i}" ]; then if [ -f "$HOME/.not_logged_in_yet" ]; then - echo -e "\n\e[0;31mThank you for choosing Armbian! Support: \e[1m\e[39mwww.armbian.com\x1B[0m\n" + if [[ $IMAGE_TYPE != nightly ]]; then + echo -e "\n\e[0;31mThank you for choosing Armbian! Support: \e[1m\e[39mwww.armbian.com\x1B[0m\n" + else + echo -e "\nYou are using Armbian nightly build." + echo -e "\nIt is provided \e[0;31mAS IS\x1B[0m with \e[0;31mNO WARRANTY\x1B[0m and \e[0;31mNO END USER SUPPORT\x1B[0m.\n" + fi echo -e "Creating new account. Please provide a username (eg. your forename): \c" read username RealUserName="$(echo "${username}" | tr '[:upper:]' '[:lower:]' | tr -d -c '[:alnum:]')" diff --git a/scripts/update-motd.d/10-header b/scripts/update-motd.d/10-header index 31c56e0a43..332a802a83 100644 --- a/scripts/update-motd.d/10-header +++ b/scripts/update-motd.d/10-header @@ -7,4 +7,4 @@ KERNELID=$(uname -r) TERM=linux toilet -f standard -F metal $BOARD_NAME -printf '\nWelcome to \e[0;91mARMBIAN\x1B[0m %s %s\n' "$PRETTY_NAME $KERNELID" +printf '\nWelcome to \e[0;91mARMBIAN\x1B[0m %s %s %s %s\n' "$VERSION $IMAGE_TYPE $PRETTY_NAME $KERNELID"