This commit is contained in:
Егор
2025-03-14 16:26:35 +00:00
committed by GitHub
parent 3b3e3f3fd6
commit 7208832073
3 changed files with 11 additions and 22 deletions

View File

@@ -35,17 +35,12 @@ check_utils(){
fi fi
} }
if [ test -f $INSTALL_PATH_FILE ]; then
TOOLCHAIN_DIR=$(head -n 1 $INSTALL_PATH_FILE) TOOLCHAIN_DIR=$(head -n 1 $INSTALL_PATH_FILE)
else echo -n -e "\e[0mToolchain install path \e[90m(default is $TOOLCHAIN_DIR)\e[97m: "
echo -n -e "\e[0mToolchain install path \e[90m(default is $DEFAULT_TOOLCHAIN_DIR)\e[97m: "
read INPUT read INPUT
if [[ ! -z "$INPUT" ]]; then if [[ ! -z "$INPUT" ]]; then
TOOLCHAIN_DIR=$INPUe TOOLCHAIN_DIR=$INPUT
else
TOOLCHAIN_DIR=$DEFAULT_TOOLCHAIN_DIR
fi
fi fi
print_msg "Checking utilities..." print_msg "Checking utilities..."

View File

@@ -35,17 +35,12 @@ check_utils(){
fi fi
} }
if [ test -f $INSTALL_PATH_FILE ]; then
TOOLCHAIN_DIR=$(head -n 1 $INSTALL_PATH_FILE) TOOLCHAIN_DIR=$(head -n 1 $INSTALL_PATH_FILE)
else echo -n -e "\e[0mToolchain install path \e[90m(default is $TOOLCHAIN_DIR)\e[97m: "
echo -n -e "\e[0mToolchain install path \e[90m(default is $DEFAULT_TOOLCHAIN_DIR)\e[97m: "
read INPUT read INPUT
if [[ ! -z "$INPUT" ]]; then if [[ ! -z "$INPUT" ]]; then
TOOLCHAIN_DIR=$INPUe TOOLCHAIN_DIR=$INPUT
else
TOOLCHAIN_DIR=$DEFAULT_TOOLCHAIN_DIR
fi
fi fi
echo -e "\e[0mInstalling toolchain to \e[97m$TOOLCHAIN_DIR\e[0m" echo -e "\e[0mInstalling toolchain to \e[97m$TOOLCHAIN_DIR\e[0m"
@@ -117,8 +112,6 @@ EXPORT_MESSSAGE="export $MESSAGE"
if [ ! "$(id -u)" -ne 0 ] if [ ! "$(id -u)" -ne 0 ]
then then
echo $MESSAGE >> /etc/profile echo $MESSAGE >> /etc/profile
sudo mkdir -p $CONFIG_FOLDER
echo $TOOLCHAIN_DIR > $INSTALL_PATH_FILE echo $TOOLCHAIN_DIR > $INSTALL_PATH_FILE
else else
if ! grep -q $EXPORT_MESSSAGE ~/.bashrc; then if ! grep -q $EXPORT_MESSSAGE ~/.bashrc; then

View File

@@ -0,0 +1 @@
/home/autobuild/tools