Skip to content

Commit 0fa0b2f

Browse files
committed
Adding remote installer copy
1 parent eedf05d commit 0fa0b2f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

installer.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ function initInstaller(){
3232

3333
MODE_HELP="help"
3434
MODE_JDK="jdk"
35+
MODE_COPY_INSTALLER="copy-installer"
3536
MODE_EXTENDED="extended"
3637

3738
#Init
@@ -48,6 +49,11 @@ if [ "$1" == "$MODE_JDK" ]; then
4849
runModule copy-jdk
4950
fi
5051

52+
if [ "$1" == "$MODE_COPY_INSTALLER" ]; then
53+
CREDENTIAL=$2
54+
runModule copy-installer
55+
fi
56+
5157
runModule platform
5258
runModule java
5359

modules/copy-installer.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
if [ -e "/home/robot/installer/installer.sh" ]; then
4+
echo $CREDENTIAL
5+
ssh $CREDENTIAL 'bash -s' < mkdir installer
6+
scp "/home/robot/installer/installer.sh" "$CREDENTIAL:/home/robot"
7+
ssh $CREDENTIAL 'bash -s' < chmod +x installer.sh
8+
exit
9+
else
10+
echo "Sorry, the installer didn´t detect the installer"
11+
echo "on /home/robot/installer"
12+
echo "try to review your installation on your EV3 Brick."
13+
echo
14+
exit 1
15+
fi

0 commit comments

Comments
 (0)