diff --git a/slsDetectorServers/compileAllServers.sh b/slsDetectorServers/compileAllServers.sh index a182a502c..5d184c8da 100755 --- a/slsDetectorServers/compileAllServers.sh +++ b/slsDetectorServers/compileAllServers.sh @@ -59,6 +59,7 @@ do file="${i}_developer" echo -e "Compiling $dir [$file]" cd $dir + make clean if make $target; then deterror[$idet]="OK" else diff --git a/slsDetectorServers/compileAllServers_noAPIUpdate.sh b/slsDetectorServers/compileAllServers_noAPIUpdate.sh deleted file mode 100644 index c2aade983..000000000 --- a/slsDetectorServers/compileAllServers_noAPIUpdate.sh +++ /dev/null @@ -1,73 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package - -det_list=("ctbDetectorServer" - "gotthard2DetectorServer" - "jungfrauDetectorServer" - "mythen3DetectorServer" - "moenchDetectorServer" - "xilinx_ctbDetectorServer" - ) -usage="\nUsage: compileAllServers.sh [server|all(opt)]. \n\tNo arguments mean all servers with 'developer' branch." - -# arguments -if [ $# -eq 0 ]; then - # no argument, all servers - declare -a det=${det_list[@]} - echo "Compiling all servers" -elif [ $# -eq 1 ]; then - # 'all' servers - if [[ $1 == "all" ]]; then - declare -a det=${det_list[@]} - echo "Compiling all servers" - else - # only one server - # arg not in list - if [[ $det_list != *$1* ]]; then - echo -e "Invalid argument 1: $1. $usage" - return -1 - fi - declare -a det=("${1}") - #echo "Compiling only $1" - 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 - if make clean; 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 - - - - diff --git a/slsDetectorServers/compileEigerServer.sh b/slsDetectorServers/compileEigerServer.sh old mode 100644 new mode 100755 index 35aff3f80..37aefee6a --- a/slsDetectorServers/compileEigerServer.sh +++ b/slsDetectorServers/compileEigerServer.sh @@ -3,21 +3,27 @@ deterror="OK" dir="eigerDetectorServer" file="${dir}_developer" -branch="" + +usage="\nUsage: compileAllServers.sh [update_api(opt)]. \n\t update_api if true updates the api to version in VERSION file" + +update_api=false +target=clean # arguments if [ $# -eq 1 ]; then - branch+=$1 - #echo "with branch $branch" + update_api=$1 + if $update_api ; then + target=version + echo "updating api to $(cat ../VERSION)" + fi elif [ ! $# -eq 0 ]; then - echo -e "Only one optional argument allowed for branch." + echo -e "Only one optional argument allowed for update_api." return -1 fi echo -e "Compiling $dir [$file]" cd $dir -make clean -if make version API_BRANCH=$branch; then +if make $target; then deterror="OK" else deterror="FAIL" diff --git a/slsDetectorServers/eigerDetectorServer/Makefile b/slsDetectorServers/eigerDetectorServer/Makefile index 5d896249f..63910c6f9 100755 --- a/slsDetectorServers/eigerDetectorServer/Makefile +++ b/slsDetectorServers/eigerDetectorServer/Makefile @@ -25,11 +25,10 @@ version: clean versioning $(PROGS) #hv9m_blackfin_server boot: $(OBJS) -version_branch=$(API_BRANCH) version_name=APIEIGER version_path=slsDetectorServers/eigerDetectorServer versioning: - cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;` + cd ../../ && echo $(PWD) && echo `tput setaf 6; python updateAPIVersion.py $(version_name) $(version_path); tput sgr0;` $(PROGS): $(OBJS) diff --git a/slsDetectorServers/gotthard2DetectorServer/Makefile b/slsDetectorServers/gotthard2DetectorServer/Makefile index f5fa63f14..b5670a658 100755 --- a/slsDetectorServers/gotthard2DetectorServer/Makefile +++ b/slsDetectorServers/gotthard2DetectorServer/Makefile @@ -24,11 +24,10 @@ version: clean versioning $(PROGS) boot: $(OBJS) -version_branch=$(API_BRANCH) version_name=APIGOTTHARD2 version_path=slsDetectorServers/gotthard2DetectorServer versioning: - cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;` + cd ../../ && echo $(PWD) && echo `tput setaf 6; python updateAPIVersion.py $(version_name) $(version_path); tput sgr0;` $(PROGS): $(OBJS) diff --git a/slsDetectorServers/jungfrauDetectorServer/Makefile b/slsDetectorServers/jungfrauDetectorServer/Makefile index b54c0c188..881f2e660 100755 --- a/slsDetectorServers/jungfrauDetectorServer/Makefile +++ b/slsDetectorServers/jungfrauDetectorServer/Makefile @@ -24,11 +24,10 @@ version: clean versioning $(PROGS) boot: $(OBJS) -version_branch=$(API_BRANCH) version_name=APIJUNGFRAU version_path=slsDetectorServers/jungfrauDetectorServer versioning: - cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;` + cd ../../ && echo $(PWD) && echo `tput setaf 6; python updateAPIVersion.py $(version_name) $(version_path); tput sgr0;` $(PROGS): $(OBJS) diff --git a/slsDetectorServers/moenchDetectorServer/Makefile b/slsDetectorServers/moenchDetectorServer/Makefile index 5f7457c19..71ebbf4fd 100755 --- a/slsDetectorServers/moenchDetectorServer/Makefile +++ b/slsDetectorServers/moenchDetectorServer/Makefile @@ -24,11 +24,10 @@ version: clean versioning $(PROGS) boot: $(OBJS) -version_branch=$(API_BRANCH) version_name=APIMOENCH version_path=slsDetectorServers/moenchDetectorServer versioning: - cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;` + cd ../../ && echo $(PWD) && echo `tput setaf 6; python updateAPIVersion.py $(version_name) $(version_path); tput sgr0;` $(PROGS): $(OBJS) diff --git a/slsDetectorServers/mythen3DetectorServer/Makefile b/slsDetectorServers/mythen3DetectorServer/Makefile index fb03c9d12..b6d68fac0 100755 --- a/slsDetectorServers/mythen3DetectorServer/Makefile +++ b/slsDetectorServers/mythen3DetectorServer/Makefile @@ -25,11 +25,10 @@ version: clean versioning $(PROGS) boot: $(OBJS) -version_branch=$(API_BRANCH) version_name=APIMYTHEN3 version_path=slsDetectorServers/mythen3DetectorServer versioning: - cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;` + cd ../../ && echo $(PWD) && echo `tput setaf 6; python updateAPIVersion.py $(version_name) $(version_path); tput sgr0;` $(PROGS): $(OBJS) diff --git a/slsDetectorServers/xilinx_ctbDetectorServer/Makefile b/slsDetectorServers/xilinx_ctbDetectorServer/Makefile index 59cf0fe37..77b03aeb0 100755 --- a/slsDetectorServers/xilinx_ctbDetectorServer/Makefile +++ b/slsDetectorServers/xilinx_ctbDetectorServer/Makefile @@ -36,11 +36,10 @@ version: clean versioning $(PROGS) boot: $(OBJS) -version_branch=$(API_BRANCH) version_name=APIXILINXCTB version_path=slsDetectorServers/xilinx_ctbDetectorServer versioning: - cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;` + cd ../../ && echo $(PWD) && echo `tput setaf 6; python updateAPIVersion.py $(version_name) $(version_path); tput sgr0;` $(PROGS): $(OBJS)