printf gray

This commit is contained in:
timerix 2022-09-09 21:58:33 +06:00
parent 0b610276d1
commit 2c23bf74b2
3 changed files with 9 additions and 3 deletions

View File

@ -14,3 +14,4 @@ if [ -f "$PRE_BUILD_SCRIPT" ]; then
fi fi
./$TASK_SCRIPT ./$TASK_SCRIPT
printf "${GRAY}"

View File

@ -32,6 +32,7 @@ function compile {
if [ $compilation_error != 0 ] if [ $compilation_error != 0 ]
then then
printf "${GRAY}"
exit 1 exit 1
fi fi
} }
@ -63,7 +64,7 @@ $(find $OBJDIR -name '*.a')"
printf "${GREEN}file $CYAN$outfile ${GREEN}created\n" printf "${GREEN}file $CYAN$outfile ${GREEN}created\n"
rm -rf $OBJDIR rm -rf $OBJDIR
else else
printf "${RED}some error happened\n" printf "${RED}some error happened\n${GRAY}"
exit 1 exit 1
fi fi
} }
@ -80,7 +81,7 @@ function pack_static_lib {
printf "${GREEN}file $CYAN$outfile ${GREEN}created\n" printf "${GREEN}file $CYAN$outfile ${GREEN}created\n"
rm -rf $OBJDIR rm -rf $OBJDIR
else else
printf "${RED}some error happened\n" printf "${RED}some error happened\n${GRAY}"
exit 1 exit 1
fi fi
} }

View File

@ -16,6 +16,7 @@ function create_default_config(){
if [ ! -f ".config" ]; then if [ ! -f ".config" ]; then
printf "${YELLOW}./.config doesn't exist\n" printf "${YELLOW}./.config doesn't exist\n"
create_default_config create_default_config
printf "${GRAY}"
exit exit
fi fi
source .config source .config
@ -30,8 +31,11 @@ if [ ! $CONFIG_VER -eq 2 ]; then
[Yy] ) [Yy] )
cp .config .config.backup cp .config .config.backup
create_default_config create_default_config
printf "${GRAY}"
exit;;
[Nn] )
printf "${GRAY}"
exit;; exit;;
[Nn] ) exit;;
* ) printf "${RED}incorrect answer\n";; * ) printf "${RED}incorrect answer\n";;
esac esac
done done