Skip to content

Commit e2c7f12

Browse files
guirodrigueslimaericonr
authored andcommitted
base: new functionality for installing iocs.
This feature was created to add standard iocs to the epics-in-docker image which can be exported as no-build. It is now possible to pass a flag (-i) to install_from_github() and install_module() to generate the envPaths file for the ioc. Since these functions are no longer only about modules, it was also necessary to change some function names.
1 parent f166bd5 commit e2c7f12

File tree

4 files changed

+34
-19
lines changed

4 files changed

+34
-19
lines changed

base/install-functions.sh

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ get_module_path() {
66
done
77
}
88

9-
download_github_module() {
9+
download_from_github() {
1010
github_org=$1
1111
module_name=$2
1212
commit=$3
@@ -17,6 +17,12 @@ download_github_module() {
1717
}
1818

1919
install_module() {
20+
is_ioc=false
21+
if [ "$1" = "-i" ]; then
22+
is_ioc=true
23+
shift
24+
fi
25+
2026
module_name=$1
2127
dependency_name=$2
2228
release_modules="$3"
@@ -30,20 +36,29 @@ install_module() {
3036

3137
make -j${JOBS} install
3238
make clean
39+
if $is_ioc; then
40+
make -C iocBoot
41+
fi
3342

3443
echo ${dependency_name}=${PWD} >> ${EPICS_RELEASE_FILE}
3544

3645
cd -
3746
}
3847

3948
# Install module from GitHub tagged versions or URL
40-
install_github_module() {
49+
install_from_github() {
50+
flag_ioc=""
51+
if [ "$1" = "-i" ]; then
52+
flag_ioc=$1
53+
shift
54+
fi
55+
4156
github_org=$1
4257
module_name=$2
4358
dependency_name=$3
4459
tag=$4
4560
release_content="$5"
4661

47-
download_github_module $github_org $module_name $tag
48-
install_module $module_name $dependency_name "$release_content"
62+
download_from_github $github_org $module_name $tag
63+
install_module $flag_ioc $module_name $dependency_name "$release_content"
4964
}

base/install_area_detector.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ make clean
9999

100100
cd ..
101101

102-
download_github_module cnpem ssc-pimega $LIBSSCPIMEGA_VERSION
102+
download_from_github cnpem ssc-pimega $LIBSSCPIMEGA_VERSION
103103
make -C ssc-pimega/c install
104104

105-
install_github_module cnpem NDSSCPimega NDSSCPIMEGA $NDSSCPIMEGA_VERSION "
105+
install_from_github cnpem NDSSCPimega NDSSCPIMEGA $NDSSCPIMEGA_VERSION "
106106
EPICS_BASE
107107
ASYN
108108
AREA_DETECTOR

base/install_modules.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,60 @@ set -ex
44

55
. /opt/epics/install-functions.sh
66

7-
install_github_module mdavidsaver pvxs PVXS $PVXS_VERSION "
7+
install_from_github mdavidsaver pvxs PVXS $PVXS_VERSION "
88
EPICS_BASE
99
"
1010

11-
install_github_module epics-modules sequencer SNCSEQ $SEQUENCER_VERSION "
11+
install_from_github epics-modules sequencer SNCSEQ $SEQUENCER_VERSION "
1212
EPICS_BASE
1313
"
1414

15-
install_github_module epics-modules calc CALC $CALC_VERSION "
15+
install_from_github epics-modules calc CALC $CALC_VERSION "
1616
EPICS_BASE
1717
SNCSEQ
1818
"
1919

2020
# Build asyn without seq since it's only needed for testIPServer
21-
install_github_module epics-modules asyn ASYN $ASYN_VERSION "
21+
install_from_github epics-modules asyn ASYN $ASYN_VERSION "
2222
EPICS_BASE
2323
CALC
2424
"
2525

26-
install_github_module paulscherrerinstitute StreamDevice STREAM $STREAMDEVICE_VERSION "
26+
install_from_github paulscherrerinstitute StreamDevice STREAM $STREAMDEVICE_VERSION "
2727
EPICS_BASE
2828
ASYN
2929
CALC
3030
"
3131

32-
install_github_module epics-modules busy BUSY $BUSY_VERSION "
32+
install_from_github epics-modules busy BUSY $BUSY_VERSION "
3333
EPICS_BASE
3434
ASYN
3535
"
3636

37-
install_github_module epics-modules autosave AUTOSAVE $AUTOSAVE_VERSION "
37+
install_from_github epics-modules autosave AUTOSAVE $AUTOSAVE_VERSION "
3838
EPICS_BASE
3939
"
4040

41-
install_github_module epics-modules sscan SSCAN $SSCAN_VERSION "
41+
install_from_github epics-modules sscan SSCAN $SSCAN_VERSION "
4242
EPICS_BASE
4343
SNCSEQ
4444
"
4545

46-
download_github_module ChannelFinder recsync $RECCASTER_VERSION
46+
download_from_github ChannelFinder recsync $RECCASTER_VERSION
4747
install_module recsync/client RECCASTER "
4848
EPICS_BASE
4949
"
5050

51-
install_github_module epics-modules ipac IPAC $IPAC_VERSION "
51+
install_from_github epics-modules ipac IPAC $IPAC_VERSION "
5252
EPICS_BASE
5353
"
5454

55-
download_github_module epics-modules caPutLog $CAPUTLOG_VERSION
55+
download_from_github epics-modules caPutLog $CAPUTLOG_VERSION
5656
patch -d caPutLog -Np1 < caputlog-waveform-fix.patch
5757
install_module caPutLog CAPUTLOG "
5858
EPICS_BASE
5959
"
6060

61-
install_github_module brunoseivam retools RETOOLS $RETOOLS_VERSION "
61+
install_from_github brunoseivam retools RETOOLS $RETOOLS_VERSION "
6262
EPICS_BASE
6363
"

base/install_motor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ make clean
3939

4040
cd $EPICS_MODULES_PATH
4141

42-
download_github_module dls-controls pmac $PMAC_VERSION
42+
download_from_github dls-controls pmac $PMAC_VERSION
4343

4444
rm pmac/configure/RELEASE.local.linux-x86_64
4545
rm pmac/configure/RELEASE.linux-x86_64.Common

0 commit comments

Comments
 (0)