Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit ca0bd5f

Browse files
author
Federico Guerinoni
committed
Fix script for arm platform
Signed-off-by: Federico Guerinoni <guerra@develer.com>
1 parent bf39882 commit ca0bd5f

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

arduino-connector-arm.sh

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
#!/bin/bash -e
22

3+
#
4+
# This file is part of arduino-connector
5+
#
6+
# Copyright (C) 2017-2020 Arduino AG (http://www.arduino.cc/)
7+
#
8+
# Licensed under the Apache License, Version 2.0 (the "License");
9+
# you may not use this file except in compliance with the License.
10+
# You may obtain a copy of the License at
11+
#
12+
# http://www.apache.org/licenses/LICENSE-2.0
13+
#
14+
# Unless required by applicable law or agreed to in writing, software
15+
# distributed under the License is distributed on an "AS IS" BASIS,
16+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
# See the License for the specific language governing permissions and
18+
# limitations under the License.
19+
#
20+
321
has() {
422
type "$1" > /dev/null 2>&1
523
return $?
@@ -53,19 +71,18 @@ fi
5371
echo download connector
5472
echo ---------
5573
download https://downloads.arduino.cc/tools/feed/arduino-connector/arduino-connector-arm
56-
mv arduino-connector-arm arduino-connector
57-
chmod +x arduino-connector
74+
sudo mv arduino-connector-arm /usr/bin/arduino-connector
75+
sudo chmod +x /usr/bin/arduino-connector
5876

5977
echo install connector
6078
echo ---------
6179
if [ "$password" == "" ]
6280
then
63-
sudo -E ./arduino-connector -register -install
81+
sudo -E arduino-connector -register -install
6482
else
65-
echo $password | sudo -kS -E ./arduino-connector -register -install > arduino-connector.log 2>&1
83+
echo $password | sudo -kS -E arduino-connector -register -install > arduino-connector.log 2>&1
6684
fi
6785

68-
6986
echo start connector service
7087
echo ---------
7188
if [ "$password" == "" ]

0 commit comments

Comments
 (0)