Commit 37bef90f authored by Julien Penguen's avatar Julien Penguen
Browse files

simplication gestion couleur version macos

parent 28bb3095
......@@ -21,20 +21,20 @@ function_message()
echo ""
echo "------------------------------------"
echo ""
echo "\033[31m========================================================="
echo "${RED}========================================================="
echo "WARNING => ${message}"
echo "=========================================================\033[0m"
echo "=========================================================${COLOR_OFF}"
elif [ "$type_message" == "TYPE_FILE_ERROR" ]; then
echo ""
echo "------------------------------------"
echo ""
echo "\033[31m========================================================="
echo "${RED}========================================================="
echo " ERROR with option '${option}' "
echo ""
echo "${message}"
echo "=========================================================\033[0m"
echo "=========================================================${COLOR_OFF}"
echo ""
echo "------------------------------------"
......@@ -43,11 +43,11 @@ function_message()
echo ""
echo "------------------------------------"
echo ""
echo "\033[31m========================================================="
echo "${RED}========================================================="
echo " ERROR with option '${option}' "
echo ""
echo "${message}"
echo "=========================================================\033[0m"
echo "=========================================================${COLOR_OFF}"
echo ""
echo "------------------------------------"
......@@ -56,22 +56,22 @@ function_message()
echo ""
echo "------------------------------------"
echo ""
echo "\033[32m========"
echo "${GREEN}========"
echo "= HELP ="
echo "========\033[0m"
echo "========${COLOR_OFF}"
elif [ "$type_message" == "TYPE_UNKNOWN" ]; then
echo ""
echo "\033[31m==============================="
echo "${RED}==============================="
echo " error: unrecognized arguments "
echo "===============================\033[0m"
echo "===============================${COLOR_OFF}"
elif [ "$type_message" == "TYPE_EXIST_VERSION" ]; then
echo ''
echo "\033[31m===================================="
echo "${RED}===================================="
echo " WARNING"
echo "====================================\033[0m"
echo "====================================${COLOR_OFF}"
echo ''
echo '------------------------------------'
echo ''
......@@ -90,9 +90,9 @@ function_message()
elif [ "$type_message" == "TYPE_FORCE_WARNING" ]; then
echo ''
echo "\033[31m===================================="
echo "${RED}===================================="
echo " WARNING"
echo "====================================\033[0m"
echo "====================================${COLOR_OFF}"
echo ''
echo '------------------------------------'
echo ''
......@@ -108,9 +108,9 @@ function_message()
elif [ "$type_message" == "TYPE_DELETE_EXIST_VERSION" ]; then
echo ''
echo "\033[31m===================================="
echo "${RED}===================================="
echo " WARNING"
echo "====================================\033[0m"
echo "====================================${COLOR_OFF}"
echo ''
echo '------------------------------------'
echo ''
......@@ -1200,7 +1200,7 @@ case ${sort_arg_keys[0]} in
if [ -f ${area_ajs[$k]} ]; then
echo "=> ${area_ajs[$k]} exist"
else
echo "=> \033[31mWARNING\033[0m : ${area_ajs[$k]} not found"
echo "=> ${RED}WARNING${COLOR_OFF} : ${area_ajs[$k]} not found"
echo "=> construction of ${area_ajs[$k]} in progress ..."
function_create_ajs_file ${INPUT_FILE_SURVEYS} ${area_ajs[$k]} ${list_zone[$k]} ${list_ra[k]} ${list_dec[k]} "/home/"$USER"/.photos_montage_aladin/"${list_zone[$k]}"/images"
echo "=> construction of ${area_ajs[$k]} OK"
......@@ -1261,7 +1261,7 @@ case ${sort_arg_keys[0]} in
state="RUN"
if [ $force == 'FALSE' ]; then
echo "=> \033[31mWARNING\033[0m : Missing one or more images or montages"
echo "=> ${RED}WARNING${COLOR_OFF} : Missing one or more images or montages"
fi
fi
......@@ -1383,7 +1383,7 @@ case ${sort_arg_keys[0]} in
else
echo "=> \033[32mINFOS\033[0m : Nothing to do for ${area_folder[$k]} all files are present"
echo "=> ${GREEN}INFOS${COLOR_OFF} : Nothing to do for ${area_folder[$k]} all files are present"
echo " "
fi
......@@ -1538,8 +1538,8 @@ case ${sort_arg_keys[0]} in
echo "-------------------------------------------------------------------"
echo " aladin stable versions available on :"
echo ""
echo "\033[31m- Aladin server : ${ALADIN_URL}\033[31m"
echo "\033[32m- Localhost\033[0m"
echo "${RED}- Aladin server : ${ALADIN_URL}${RED}"
echo "${GREEN}- Localhost${COLOR_OFF}"
echo "-------------------------------------------------------------------"
echo ""
......@@ -1547,12 +1547,12 @@ case ${sort_arg_keys[0]} in
for number_version in ${list_jar}
do
if [ -z $id_image ]; then
echo " \033[31m ${number_version}\033[0m"
echo " ${RED} ${number_version}${COLOR_OFF}"
else
if [ ${number_version} == ${ALADIN_VERSION} ]; then
echo " \033[32m *\033[0m \033[31m${number_version}\033[0m"
echo " ${GREEN} *${COLOR_OFF} ${RED}${number_version}${COLOR_OFF}"
else
echo " \033[31m ${number_version}\033[0m"
echo " ${RED} ${number_version}${COLOR_OFF}"
fi
fi
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment