Skip to content

Commit

Permalink
Upgrade install script to allow for different ssh ports for mac's
Browse files Browse the repository at this point in the history
  • Loading branch information
hrue committed Sep 23, 2024
1 parent b6c1ff7 commit a1466c7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
16 changes: 14 additions & 2 deletions utils/R/run-make
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ is_set() {
umask 0022

export INLA_MAC=${INLA_MAC-"rueh@kw-16659.kaust.edu.sa"}
export INLA_MAC_PORT=${INLA_MAC_PORT-"22"}

export INLA_MAC_ARM64=${INLA_MAC_ARM64-"rueh@kw-18302.kaust.edu.sa"}
export INLA_MAC_ARM64_PORT=${INLA_MAC_ARM64_PORT-"22"}

export INLA_LINUX=hrue@localhost
export INLA_LINUX_PORT=2222

export INLA_WINDOWS=hrue@localhost
export INLA_WINDOWS_PORT=${INLA_WINDOWS_PORT-"22"}

output () {
echo "$0: $@"
Expand All @@ -37,13 +42,20 @@ else
fi

export INLA_VERSION=$(echo $INLA_TAG | awk -F_ '{print $2}')
output INLA_TAG=$INLA_TAG
output INLA_VERSION=$INLA_VERSION

output INLA_MAC=$INLA_MAC
output INLA_MAC_PORT=$INLA_MAC_PORT

output INLA_MAC_ARM64=$INLA_MAC_ARM64
output INLA_MAC_ARM64_PORT=$INLA_MAC_ARM64_PORT

output INLA_LINUX=$INLA_LINUX
output INLA_LINUX_PORT=$INLA_LINUX_POT

output INLA_WINDOWS=$INLA_WINDOWS
output INLA_TAG=$INLA_TAG
output INLA_VERSION=$INLA_VERSION
output INLA_WINDOWS_PORT=$INLA_WINDOWS_PORT

shift 1
exec make -f Makefile "$@"
18 changes: 9 additions & 9 deletions utils/R/updateBin
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ fix-perm () {
for m in 64; do
DIR=$d/mac/${m}bit
for p in inla fmesher; do
for f in $(ssh -x $INLA_MAC bin/my.otool builds/build$m/local/bin/$p) builds/build$m/local/bin/$p; do
for f in $(ssh -x -p $INLA_MAC_PORT $INLA_MAC bin/my.otool builds/build$m/local/bin/$p) builds/build$m/local/bin/$p; do
echo sync $f
for i in {1..10}; do
rsync -auvL $INLA_MAC:$f $DIR/. && break
rsync --rsh="ssh -x -p $INLA_MAC_PORT" -auvL $INLA_MAC:$f $DIR/. && break
sleep 2
done
done
done
rsync -auvL $INLA_MAC:builds/build$m/external-packages/external $DIR/.
rsync --rsh="ssh -x -p $INLA_MAC_PORT" -auvL $INLA_MAC:builds/build$m/external-packages/external $DIR/.
fix-perm $DIR
## those we like be be first
for f in $DIR/lib*malloc.*; do
Expand All @@ -37,15 +37,15 @@ done
for m in Something; do
DIR=$d/mac.arm64
for p in inla fmesher; do
for f in $(ssh -x $INLA_MAC_ARM64 bin/my.otool builds/arm64/local/bin/$p) builds/arm64/local/bin/$p; do
for f in $(ssh -x -p $INLA_MAC_ARM64_PORT $INLA_MAC_ARM64 bin/my.otool builds/arm64/local/bin/$p) builds/arm64/local/bin/$p; do
echo sync $f
for i in {1..10}; do
rsync -auvL $INLA_MAC_ARM64:$f $DIR/. && break
rsync --rsh="ssh -x -p $INLA_MAC_ARM64_PORT" -auvL $INLA_MAC_ARM64:$f $DIR/. && break
sleep 2
done
done
done
rsync -auvL $INLA_MAC_ARM64:builds/arm64/external-packages/external $DIR/.
rsync --rsh="ssh -x -p $INLA_MAC_ARM64_PORT" -auvL $INLA_MAC_ARM64:builds/arm64/external-packages/external $DIR/.
fix-perm $DIR
for f in $DIR/lib*malloc.*; do
test -f "$f" && mv -f -v "$f" $DIR/malloc
Expand Down Expand Up @@ -83,14 +83,14 @@ done
for m in 64; do
DIR=$d/windows/${m}bit
for p in inla fmesher; do
for f in $(ssh -x $INLA_WINDOWS bin/my.objdump builds/windows$m/local/bin/$p.exe) builds/windows$m/local/bin/$p.exe; do
for f in $(ssh -x -p $INLA_WINDOWS_PORT $INLA_WINDOWS bin/my.objdump builds/windows$m/local/bin/$p.exe) builds/windows$m/local/bin/$p.exe; do
echo sync $f
for i in {1..10}; do
rsync --rsh="ssh -x" -auvL $INLA_WINDOWS:$f $DIR/. && break
rsync --rsh="ssh -x -p $INLA_WINDOWS_PORT" -auvL $INLA_WINDOWS:$f $DIR/. && break
done
done
done
rsync --rsh="ssh -x" -auvL $INLA_WINDOWS:builds/windows$m/external-packages/external $DIR/.
rsync --rsh="ssh -x -p $INLA_WINDOWS_PORT" -auvL $INLA_WINDOWS:builds/windows$m/external-packages/external $DIR/.
fix-perm $DIR
done

0 comments on commit a1466c7

Please sign in to comment.