Skip to content

Commit 5e2b3be

Browse files
install: add symlink handling for single apps
1 parent 1f1baa1 commit 5e2b3be

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scripts/install.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ sleep 2
2222

2323
if [ ! -z "$appname" ]; then
2424
echo "Installing one app: $appname"
25-
appdir="apps/$appname/"
25+
appdir="apps/$appname"
2626
target="apps/"
2727
if [ ! -d "$appdir" ]; then
2828
echo "$appdir doesn't exist so taking the builtin/"
@@ -36,7 +36,12 @@ if [ ! -z "$appname" ]; then
3636
$mpremote mkdir "/apps"
3737
#$mpremote mkdir "/builtin" # dont do this because it breaks the mount!
3838
#$mpremote mkdir "/builtin/apps"
39-
$mpremote fs cp -r "$appdir" :/"$target"
39+
if test -L "$appdir"; then
40+
$mpremote fs mkdir :/"$appdir"
41+
$mpremote fs cp -r "$appdir"/* :/"$appdir"/
42+
else
43+
$mpremote fs cp -r "$appdir" :/"$target"
44+
fi
4045
echo "start_app(\"/$appdir\")"
4146
$mpremote
4247
popd

0 commit comments

Comments
 (0)