mirror of
https://code.it4i.cz/sccs/easyconfigs-it4i.git
synced 2025-04-08 07:52:11 +01:00

modified: g/gettext/gettext-0.19.4.eb modified: l/libgd/libgd-2.2.3.eb modified: p/protobuf-python/protobuf-python-3.2.0-intel-2016b-Python-2.7.12.eb modified: test-install
65 lines
1.5 KiB
Plaintext
65 lines
1.5 KiB
Plaintext
# !/bin/bash
|
|
|
|
printf "\033c"
|
|
DIR=`pwd`
|
|
|
|
NAME=$(hostname -f | cut -d '.' -f 2)
|
|
|
|
if [ $NAME = "bullx" ]; then
|
|
NAME="ANSELM"
|
|
else
|
|
NAME="SALOMON"
|
|
fi
|
|
|
|
printf "Preparing data for analyse ...\n"
|
|
|
|
ml --show_hidden -t av 2>&1 > /dev/null| awk '{print $1 }' | grep -v "/apps/*" > $DIR/ml_av
|
|
|
|
find /apps/easybuild/easyconfigs-it4i/ -type f -name "*.eb" | cut -d '/' -f 6,7 | sed 's/.eb//' > $DIR/eb-it4i_tmp
|
|
echo -n "" > "$DIR/results/$NAME-not_installed.txt"
|
|
echo -n "" > "$DIR/results/$NAME-warning.txt"
|
|
|
|
while read i; do a=$(echo $i | cut -d '/' -f 1); b=$(echo $i | sed -rn "s/$a\/$a[-]+(.*)/\1/p"); echo "$a/$b" ;done < <(cat $DIR/eb-it4i_tmp) > $DIR/eb-it4i
|
|
|
|
INSTALL="FALSE"
|
|
format="%-80s %30s\n"
|
|
|
|
red=$'\e[1;31m'
|
|
grn=$'\e[1;32m'
|
|
yel=$'\e[1;33m'
|
|
blu=$'\e[1;34m'
|
|
mag=$'\e[1;35m'
|
|
cyn=$'\e[1;36m'
|
|
end=$'\e[0m'
|
|
|
|
while read x; do
|
|
while read y; do
|
|
if [ "$x" = "$y" ]; then
|
|
INSTALL="OK"
|
|
break
|
|
fi
|
|
done < <(cat $DIR/ml_av)
|
|
|
|
if [ ! "$INSTALL" = "OK" ]; then
|
|
if [ -d "/apps/all/$x" ]; then
|
|
INSTALL="WARNING"
|
|
fi
|
|
fi
|
|
|
|
if [ "$INSTALL" = "OK" ]; then
|
|
printf "$format" "$x" "${grn}installed${end}"
|
|
INSTALL="FALSE"
|
|
elif [ "$INSTALL" = "WARNING" ]; then
|
|
printf "$format" "$x" "${yel}warning${end}"
|
|
echo "$x" >> "$DIR/results/$NAME-warning.txt"
|
|
INSTALL="FALSE"
|
|
else
|
|
printf "$format" "$x" "${red}not installed${end}"
|
|
echo "$x" >> "$DIR/results/$NAME-not_installed.txt"
|
|
INSTALL="FALSE"
|
|
fi
|
|
|
|
done < <(cat $DIR/eb-it4i)
|
|
|
|
rm $DIR/eb-it4i $DIR/ml_av $DIR/eb-it4i_tmp
|