Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit702976f

Browse files
2E0PGSfacchinm
authored andcommitted
Display a more user friendly error if script isn't ran as root. symlink.
1 parent4cd38aa commit702976f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

‎build/linux/dist/install.sh‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ xdg_install_f() {
6868

6969
# Add symlink for arduino so it's in users path
7070
echo""# Ensure password request message is on new line
71-
sudo ln -s${SCRIPT_PATH}/arduino /usr/local/bin/arduino
71+
if! ln -s${SCRIPT_PATH}/arduino /usr/local/bin/arduino;then
72+
echo"Adding symlink failed. Hope that's OK. If not then rerun as root with sudo."
73+
fi
7274

7375
# Clean up
7476
rm"${TMP_DIR}/${RESOURCE_NAME}.desktop"
@@ -104,7 +106,9 @@ simple_install_f() {
104106

105107
# Add symlink for arduino so it's in users path
106108
echo""# Ensure password request message is on new line
107-
sudo ln -s${SCRIPT_PATH}/arduino /usr/local/bin/arduino
109+
if! ln -s${SCRIPT_PATH}/arduino /usr/local/bin/arduino;then
110+
echo"Adding symlink failed. Hope that's OK. If not then rerun as root with sudo."
111+
fi
108112

109113
# Clean up temp dir
110114
rm"${TMP_DIR}/${RESOURCE_NAME}.desktop"
@@ -148,7 +152,9 @@ xdg_uninstall_f() {
148152

149153
# Remove symlink for arduino
150154
echo""# Ensure password request message is on new line
151-
sudo rm /usr/local/bin/arduino
155+
if! rm /usr/local/bin/arduino;then
156+
echo"Removing symlink failed. Hope that's OK. If not then rerun as root with sudo."
157+
fi
152158

153159
}
154160

@@ -183,7 +189,9 @@ simple_uninstall_f() {
183189

184190
# Remove symlink for arduino
185191
echo""# Ensure password request message is on new line
186-
sudo rm /usr/local/bin/arduino
192+
if! rm /usr/local/bin/arduino;then
193+
echo"Removing symlink failed. Hope that's OK. If not then rerun as root with sudo."
194+
fi
187195

188196
}
189197

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp