diff --git a/build-all.sh b/build-all.sh index 5eb57ebc1..5c2a9f1a6 100644 --- a/build-all.sh +++ b/build-all.sh @@ -21,7 +21,7 @@ BRANCH_LIST=("default" "next" "dev") # add dependencies for converting .md to .pdf if [[ ! -f /etc/apt/sources.list.d/nodesource.list ]]; then curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - - apt-get install -y libfontconfig1 nodejs + apt-get install -y libfontconfig1 nodejs npm install -g markdown-pdf fi @@ -114,9 +114,9 @@ for line in "${buildlist[@]}"; do n=$[$n+1] if [[ $from -le $n && ! -f "/run/Armbian_${BOARD^}_${BRANCH}_${RELEASE}_$BUILD_DESKTOP.pid" ]]; then display_alert "Building $n / ${#buildlist[@]}" "Board: $BOARD Kernel:$BRANCH${RELEASE:+ Release: $RELEASE}${BUILD_DESKTOP:+ Desktop: $BUILD_DESKTOP}" "ext" - #touch "/run/Armbian_${BOARD^}_${BRANCH}_${RELEASE}_$BUILD_DESKTOP.pid" + #touch "/run/Armbian_${BOARD^}_${BRANCH}_${RELEASE}_$BUILD_DESKTOP.pid" source $SRC/lib/main.sh - #rm "/run/Armbian_${BOARD^}_${BRANCH}_${RELEASE}_$BUILD_DESKTOP.pid" + #rm "/run/Armbian_${BOARD^}_${BRANCH}_${RELEASE}_$BUILD_DESKTOP.pid" fi done diff --git a/general.sh b/general.sh index 7e64f2dc6..701bbcf72 100644 --- a/general.sh +++ b/general.sh @@ -420,7 +420,7 @@ addtorepo() # publish aptly publish -passphrase=$GPG_PASS -origin=Armbian -label=Armbian -config=config/aptly.conf -component=main,utils,${release}-desktop \ - --distribution=$release repo $release utils ${release}-desktop + --distribution=$release repo $release utils ${release}-desktop if [[ $? -ne 0 ]]; then display_alert "Publishing failed" "$release" "err" diff --git a/repo-show.sh b/repo-show.sh index 0c2355e71..8c36f65a2 100644 --- a/repo-show.sh +++ b/repo-show.sh @@ -15,7 +15,7 @@ source general.sh DISTROS=("wheezy" "jessie" "trusty" "xenial") - + showall() { for release in "${DISTROS[@]}"; do diff --git a/scripts/c1_init.sh b/scripts/c1_init.sh index a47f59a85..0192d68bb 100644 --- a/scripts/c1_init.sh +++ b/scripts/c1_init.sh @@ -1,7 +1,7 @@ #!/bin/sh for x in $(cat /proc/cmdline); do - case ${x} in + case ${x} in m_bpp=*) export bpp=${x#*=} ;; hdmimode=*) export mode=${x#*=} ;; esac diff --git a/scripts/c2_init.sh b/scripts/c2_init.sh index 150c1eec8..2770ba1c2 100644 --- a/scripts/c2_init.sh +++ b/scripts/c2_init.sh @@ -27,9 +27,9 @@ common_display_setup() { } case $mode in - 480*) - export X=720 - export Y=480 + 480*) + export X=720 + export Y=480 ;; 576*) export X=720 diff --git a/scripts/check_first_login.sh b/scripts/check_first_login.sh index c33870f8b..165d3618a 100644 --- a/scripts/check_first_login.sh +++ b/scripts/check_first_login.sh @@ -33,7 +33,7 @@ if [ "$-" != "${-#*i}" ]; then fi # check whether desktop environment has to be considered - if [ -f /etc/init.d/nodm ] ; then + if [ -f /etc/init.d/nodm ] ; then sed -i "s/NODM_USER=\(.*\)/NODM_USER=${RealUserName}/" /etc/default/nodm sed -i "s/NODM_ENABLED=\(.*\)/NODM_ENABLED=true/g" /etc/default/nodm if [[ -z $ConfigureDisplay || $ConfigureDisplay == n || $ConfigureDisplay == N ]]; then diff --git a/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh b/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh index 78f46cd89..bab496090 100644 --- a/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh +++ b/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh @@ -100,7 +100,7 @@ EOF [[ $DEVICE_TYPE = "a20" ]] && echo "machid=10bb" >> /mnt/bootfs/uEnv.txt # ugly hack becouse we don't have sources for A10 nand uboot - if [[ "${ID}" == "Cubieboard" || "${BOARD_NAME}" == "Cubieboard" || "${ID}" == "Lime A10" || "${BOARD_NAME}" == "Lime A10" ]]; then + if [[ "${ID}" == "Cubieboard" || "${BOARD_NAME}" == "Cubieboard" || "${ID}" == "Lime A10" || "${BOARD_NAME}" == "Lime A10" ]]; then cp /mnt/bootfs/uEnv.txt /mnt/rootfs/boot/uEnv.txt cp /mnt/bootfs/script.bin /mnt/rootfs/boot/script.bin cp /mnt/bootfs/uImage /mnt/rootfs/boot/uImage @@ -256,7 +256,7 @@ main() { # This tool must run under root - if [[ ${EUID} -ne 0 ]]; then + if [[ ${EUID} -ne 0 ]]; then echo "This tool must run as root. Exiting ..." exit 1 fi @@ -272,11 +272,11 @@ main() { root_partition=$(cat /proc/cmdline | sed -e 's/^.*root=//' -e 's/ .*$//') IFS="'" options=() - if [[ -n "$emmccheck" ]]; then - ichip="eMMC"; + if [[ -n "$emmccheck" ]]; then + ichip="eMMC"; dest_boot=$emmccheck"p1" dest_root=$emmccheck"p1" - else + else ichip="NAND" dest_boot="/dev/nand1" dest_root="/dev/nand2" @@ -299,11 +299,11 @@ main() { title="$ichip install" command="Power off" ShowWarning "This script will erase your $ichip. Continue?" - if [[ -n "$emmccheck" ]]; then - umountdevice "$emmccheck" + if [[ -n "$emmccheck" ]]; then + umountdevice "$emmccheck" formatemmc "$emmccheck" else - umountdevice "/dev/nand" + umountdevice "/dev/nand" formatnand fi create_armbian "$dest_boot" "$dest_root" @@ -313,8 +313,8 @@ main() { command="Power off" checksatatarget ShowWarning "This script will erase your $ichip and $SDA_ROOT_PART. Continue?" - if [[ -n "$emmccheck" ]]; then - umountdevice "$emmccheck" + if [[ -n "$emmccheck" ]]; then + umountdevice "$emmccheck" formatemmc "$emmccheck" else umountdevice "/dev/nand" diff --git a/upgrade.sh b/upgrade.sh index b4fbdb289..1fe28607c 100644 --- a/upgrade.sh +++ b/upgrade.sh @@ -74,7 +74,7 @@ bootz 0x48000000 #----------------------------------------------------------------------------------------------------------------------- fi # Recompile with: -# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr +# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr EOT mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr >/dev/null 2>&1 } @@ -120,22 +120,22 @@ get_hardware_info () # arhitecture ARCH=$(lscpu | grep Architecture | awk '{print $2}') -if [[ "$ARCH" != arm* ]]; then - echo -e "[\e[0;31m error \x1B[0m] Architecture not supported"; exit; +if [[ "$ARCH" != arm* ]]; then + echo -e "[\e[0;31m error \x1B[0m] Architecture not supported"; exit; fi # CPU HARDWARE=$(cat /proc/cpuinfo | grep Hardware | awk '{print $3}') -if [[ !( "$HARDWARE" == "sun7i" || "$HARDWARE" == "Allwinner" || "$HARDWARE" == "sun4i" ) ]]; then - echo -e "[\e[0;31m error \x1B[0m] Unsupported hw"; exit; +if [[ !( "$HARDWARE" == "sun7i" || "$HARDWARE" == "Allwinner" || "$HARDWARE" == "sun4i" ) ]]; then + echo -e "[\e[0;31m error \x1B[0m] Unsupported hw"; exit; fi # boot partition bootdevice="/dev/mmcblk0p1"; # if mmc is not present than boot can only be nand1 -if [[ "$(grep nand /proc/partitions)" != "" && "$(grep mmc /proc/partitions)" == "" ]]; then -bootdevice="/dev/nand1"; +if [[ "$(grep nand /proc/partitions)" != "" && "$(grep mmc /proc/partitions)" == "" ]]; then +bootdevice="/dev/nand1"; fi # root partition @@ -157,7 +157,7 @@ mount_boot_device () #----------------------------------------------------------------------------------------------------------------------- { if [[ "$bootdevice" == "/dev/mmcblk0p1" && "$rootdevice" != "/dev/mmcblk0p1" ]]; then - umount /boot /media/mmc + umount /boot /media/mmc mkdir -p /media/mmc/boot mount /dev/mmcblk0p1 /media/mmc/ if [ -d "/media/mmc/boot/" ]; then @@ -196,8 +196,8 @@ if [ -z "$BRANCH" ]; then IFS="'" declare -a Options=("legacy'3.4.x - 3.14.x most supported'vanilla'4.x Vanilla from www.kernel.org"); # Exceptions - if [[ $BOARD == "cubox-i" || $BOARD == "udoo-neo" || "$bootdevice" == "/dev/nand1" ]]; then - declare -a Options=("legacy'3.4.x - 3.14.x most supported"); + if [[ $BOARD == "cubox-i" || $BOARD == "udoo-neo" || "$bootdevice" == "/dev/nand1" ]]; then + declare -a Options=("legacy'3.4.x - 3.14.x most supported"); fi BoardOptions=($Options); BoardCmd=(dialog --title "Choose a board:" --backtitle "$backtitle" --menu "\n$infos" 10 60 16) @@ -213,7 +213,7 @@ if [[ $BRANCH == "vanilla" ]] ; then ROOT_BRACH="-next" else ROOT_BRACH="" -fi +fi case $BOARD in bananapipro | lamobo-r1 | orangepi | orangepimini) @@ -236,15 +236,15 @@ if [[ $BRANCH == "vanilla" ]] ; then LINUXFAMILY="sunxi"; fi ;; esac -if [[ $BOARD == "cubox-i" || $BOARD == udoo* || $BRANCH == "vanilla" ]]; - then PACKETS="linux-dtb$ROOT_BRACH-$LINUXFAMILY"; +if [[ $BOARD == "cubox-i" || $BOARD == udoo* || $BRANCH == "vanilla" ]]; + then PACKETS="linux-dtb$ROOT_BRACH-$LINUXFAMILY"; fi PACKETS="linux-image$ROOT_BRACH-$LINUXFAMILY linux-firmware-image$ROOT_BRACH-$LINUXFAMILY \ linux-u-boot-$BOARD$ROOT_BRACH linux-headers$ROOT_BRACH-$LINUXFAMILY linux-$RELEASE-root$ROOT_BRACH-$BOARD $PACKETS" } - + remove_old () #----------------------------------------------------------------------------------------------------------------------- # Delete previous kernel @@ -267,10 +267,10 @@ install_new () #----------------------------------------------------------------------------------------------------------------------- { IFS=" " -apt-get $1 -y install $PACKETS 2>&1 | dialog --title "$title" --backtitle "$backtitle" --progressbox "$2" 20 80 -if [ $? -ne 0 ]; then +apt-get $1 -y install $PACKETS 2>&1 | dialog --title "$title" --backtitle "$backtitle" --progressbox "$2" 20 80 +if [ $? -ne 0 ]; then dialog --title "$title" --backtitle "$backtitle" --infobox "\nError during new packages download." 5 41 -exit 1; +exit 1; fi } @@ -283,7 +283,7 @@ fi # This tool must run under root #----------------------------------------------------------------------------------------------------------------------- if [[ ${EUID} -ne 0 ]]; then - echo "This tool must be run as root. Exiting..." + echo "This tool must be run as root. Exiting..." exit 1 fi @@ -299,7 +299,7 @@ if [[ $(dpkg-query -W -f='${Status}' dialog 2>/dev/null | grep -c "ok installed" ]]; then echo "Downloading dependencies... please wait" apt-get install -qq -y dialog u-boot-tools debconf-utils lsb-release aptitude fake-hwclock >/dev/null 2>&1 -fi +fi display_warning install_repo