diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-10-07 11:07:33 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-10-07 11:11:16 +0200 |
commit | b14f958fd463d485a7e455b4ab10c6f7815c5e07 (patch) | |
tree | f7e29024c397ede8c095ffd733ab3bd4156e8066 | |
parent | 006b09e25c688667cd4fd5ebaeeebf06ec349914 (diff) | |
download | vendor_replicant-release-scripts-b14f958fd463d485a7e455b4ab10c6f7815c5e07.tar.gz vendor_replicant-release-scripts-b14f958fd463d485a7e455b4ab10c6f7815c5e07.tar.bz2 vendor_replicant-release-scripts-b14f958fd463d485a7e455b4ab10c6f7815c5e07.zip |
Move set_color in common.sh
The set_color function seem to be in releasevars.sh only
because releasevars.sh is sourced from other scripts.
However the file name of releasevars.sh implies that only
release variables related code or variables would be found
in it.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rwxr-xr-x | common.sh | 27 | ||||
-rwxr-xr-x | releasevars.sh | 13 |
2 files changed, 28 insertions, 12 deletions
diff --git a/common.sh b/common.sh new file mode 100755 index 0000000..fce719b --- /dev/null +++ b/common.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Copyright (C) 2021 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +set_color() +{ + if [ "$COLOR" = "1" ] ; then + color_start="\033[36m" + color_end="\033[0m" + else + color_start="" + color_end="" + fi +} diff --git a/releasevars.sh b/releasevars.sh index 8548b96..f2ba2ee 100755 --- a/releasevars.sh +++ b/releasevars.sh @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# +. common.sh RELEASE="" @@ -90,14 +90,3 @@ SECURITY="$RELEASE_DIR/security" SCRIPTS="$RELEASE_DIR/scripts" TOOLS="$RELEASE_DIR/tools" IMAGES="$RELEASE_DIR/images" - -set_color () { - if [ "$COLOR" = "1" ] - then - color_start="\033[36m" - color_end="\033[0m" - else - color_start="" - color_end="" - fi -} |