From 202d2cac81d918e7be21fe1cf2543ac1a9050a0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Sztoch?= Date: Sat, 7 Sep 2019 23:28:42 +0200 Subject: [PATCH] Added .editorconfig, removed obsoleted upgrade.sh and main.sh, launching user_config function. (#1543) --- .editorconfig | 33 +++++++++++++++++++++++++++++++++ lib/configuration.sh | 5 +++++ lib/upgrade.sh | 34 ---------------------------------- main.sh | 1 - 4 files changed, 38 insertions(+), 35 deletions(-) create mode 100644 .editorconfig delete mode 100644 lib/upgrade.sh delete mode 120000 main.sh diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..7d2cdb100 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,33 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = tab +indent_size = 8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +indent_style = space +indent_size = 4 +trim_trailing_whitespace = false +insert_final_newline = false + +# C coding style based on Linux kernel. +# https://www.kernel.org/doc/html/v5.0/process/coding-style.html + +[*.sh] +indent_style = tab +indent_size = 4 + +[*.c] +indent_style = tab +indent_size = 8 + +[*.h] +indent_style = tab +indent_size = 8 diff --git a/lib/configuration.sh b/lib/configuration.sh index 89baaf2f4..b6d58cd04 100644 --- a/lib/configuration.sh +++ b/lib/configuration.sh @@ -265,6 +265,11 @@ if [[ -f $USERPATCHES_PATH/lib.config ]]; then source "$USERPATCHES_PATH"/lib.config fi +if [[ "$(type -t user_config)" == "function" ]]; then + display_alert "Invoke function with user override" "user_config" "info" + user_config +fi + # apt-cacher-ng mirror configurarion if [[ $DISTRIBUTION == Ubuntu ]]; then APT_MIRROR=$UBUNTU_MIRROR diff --git a/lib/upgrade.sh b/lib/upgrade.sh deleted file mode 100644 index a5f5d2aea..000000000 --- a/lib/upgrade.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015-2017 Igor Pecovnik, igor.pecovnik@gma**.com -# Copyright (c) 2015-2017 other Armbian contributors (https://github.com/armbian/build/graphs/contributors) -# -# This file is licensed under the terms of the GNU General Public -# License version 2. This program is licensed "as is" without any -# warranty of any kind, whether express or implied. -# -# This file is part of the Armbian build script https://github.com/armbian/build/ - -# Show info messages about changed directory structure -# when updating from older build script versions - -TTY_X=$(($(stty size | awk '{print $2}')-6)) # determine terminal width -TTY_Y=$(($(stty size | awk '{print $1}')-6)) # determine terminal height - -if [[ $(basename "$0") == main.sh ]]; then - echo "Please use compile.sh to start the build process" - exit 255 -fi - -if [[ $(basename "$0") == compile.sh ]]; then - # assuming dialog was installed already since this is supposed to be shown only on upgrade from previous versions - dialog --title "Directory structure change notice" --colors --msgbox "Build script directory structure was changed to simplify the build environment setup, \ - simplify upgrading in the future and improve compatibility with containers like Docker and Vagrant - - To upgrade please clone the repository \Z4https://github.com/armbian/build/\Zn into an empty directory and launch \Z2compile.sh\Zn - Copying and editing compile.sh is not required, build configuration is defined in \Z1config-*.conf\Zn files - Default build configuration is defined in \Z1config-default.conf\Zn (created on first build script run) - - Sorry for the inconvenience" $TTY_Y $TTY_X - exit 255 -fi diff --git a/main.sh b/main.sh deleted file mode 120000 index 8c504aa4f..000000000 --- a/main.sh +++ /dev/null @@ -1 +0,0 @@ -lib/upgrade.sh \ No newline at end of file