mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-19 18:40:01 +02:00
* slsSupportLib done, at receiver rooting out in implementation * removed from receiver and client * removed everywhere except gui, python and client(commands.yaml and Detector.h) * updated python * fixed autocomplete to print what the issue is if there is one with ToString when running the autocomplete script to generate fixed.json. updated readme.md in generator folder * formatting * removed enums for dacs * udpating autocomplete and generating commands * removed gotthard from docs and release notes * removed dac test * bug from removing g1 * fixed virtual test for xilinx, was minor. so in this PR * gui done * binary in merge fix * formatting and removing enums * updated fixed and dump.json * bash autocomplete * updated doc on command line generation * removing increments in dac enums for backward compatibility. Not required * removed ROI from rxParameters (only in g1), not needed to be backward compatible * removed the phase shift option from det server staruip
89 lines
1.8 KiB
Bash
89 lines
1.8 KiB
Bash
# SPDX-License-Identifier: LGPL-3.0-or-other
|
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
|
|
# empty branch = developer branch in updateAPIVersion.sh
|
|
branch=""
|
|
det_list=("ctbDetectorServer
|
|
gotthard2DetectorServer
|
|
jungfrauDetectorServer
|
|
mythen3DetectorServer
|
|
moenchDetectorServer
|
|
xilinx_ctbDetectorServer"
|
|
)
|
|
usage="\nUsage: compileAllServers.sh [server|all(opt)] [branch(opt)]. \n\tNo arguments mean all servers with 'developer' branch. \n\tNo 'branch' input means 'developer branch'"
|
|
|
|
# arguments
|
|
if [ $# -eq 0 ]; then
|
|
# no argument, all servers
|
|
declare -a det=${det_list[@]}
|
|
echo "Compiling all servers"
|
|
elif [ $# -eq 1 ] || [ $# -eq 2 ]; then
|
|
# 'all' servers
|
|
if [[ $1 == "all" ]]; then
|
|
declare -a det=${det_list[@]}
|
|
echo "Compiling all servers"
|
|
else
|
|
# only one server
|
|
# arg not in list
|
|
echo $det_list | grep -w -q $1
|
|
#if [[ $det_list != *$1* ]]; then
|
|
if ! [[ $? ]] ; then
|
|
echo -e "Invalid argument 1: $1. $usage"
|
|
return 1
|
|
fi
|
|
declare -a det=("${1}")
|
|
#echo "Compiling only $1"
|
|
fi
|
|
# branch
|
|
if [ $# -eq 2 ]; then
|
|
# arg in list
|
|
if [[ $det_list == *$2* ]]; then
|
|
echo -e "Invalid argument 2: $2. $usage"
|
|
return 1
|
|
fi
|
|
branch+=$2
|
|
#echo "with branch $branch"
|
|
fi
|
|
else
|
|
echo -e "Too many arguments.$usage"
|
|
return 1
|
|
fi
|
|
|
|
declare -a deterror=("OK" "OK" "OK" "OK" "OK" "OK")
|
|
|
|
echo -e "list is ${det[@]}"
|
|
|
|
# compile each server
|
|
idet=0
|
|
for i in ${det[@]}
|
|
do
|
|
dir=$i
|
|
file="${i}_developer"
|
|
echo -e "Compiling $dir [$file]"
|
|
cd $dir
|
|
make clean
|
|
if make version API_BRANCH=$branch; then
|
|
deterror[$idet]="OK"
|
|
else
|
|
deterror[$idet]="FAIL"
|
|
fi
|
|
mv bin/$dir bin/$file
|
|
git add -f bin/$file
|
|
cp bin/$file /tftpboot/
|
|
cd ..
|
|
echo -e "\n\n"
|
|
((++idet))
|
|
done
|
|
|
|
echo -e "Results:"
|
|
idet=0
|
|
for i in ${det[@]}
|
|
do
|
|
printf "%s\t\t= %s\n" "$i" "${deterror[$idet]}"
|
|
((++idet))
|
|
done
|
|
|
|
|
|
|
|
|