Skip to content

Commit d58c93a

Browse files
committed
Changed the generated cmds/projects-viewer from a symlink to a script calling the other script, and updated the docs.
1 parent 04d4ac2 commit d58c93a

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
src/proj
44

55
# The command to start the viewer of the custom projects.
6-
# You can use cmds/set-up-custom-projects-dir to create this script (as a symlink).
6+
# You can use cmds/set-up-custom-projects-dir to create this script.
77
cmds/projects-viewer
88

99
.idea

cmds/set-up-custom-projects-dir

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ if [ ! -f "src/$1/projects-viewer" ]; then
1616
sed "s/\bsrc\/viewer\/viewer.ts\b/src\/$1\/viewer.ts/" cmds/demos-viewer > src/$1/projects-viewer
1717
fi
1818
chmod a+x src/$1/projects-viewer
19-
# Creates cmds/projects-viewer as a symlink to your projects-viewer.
19+
# Create cmds/projects-viewer calling your projects-viewer.
2020
# It will be detected and ran by cmds/viewer.
21-
ln -sf ../src/$1/projects-viewer cmds
21+
rm -f cmds/projects-viewer
22+
echo "src/$1/projects-viewer" > cmds/projects-viewer
23+
chmod a+x cmds/projects-viewer
2224

2325
echo "Custom projects directory set up in src/$1"

cmds/viewer

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# is git-ignored which allows to launch the viewer for user projects instead of demo projects,
33
# without modifying this repository.
44

5-
65
if [ -f "cmds/projects-viewer" ]; then
76
echo "Running projects-viewer:"
87
"cmds/projects-viewer"

wiki/installation_and_usage.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@ There are two main ways to start developing your own projects:
128128
- Create _src/my_projects_ directory (unless exists).
129129
- Create _src/my_projects/viewer.ts_ file (unless exists) as a copy of
130130
[_src/viewer/viewer.ts_](../src/viewer/viewer.ts).
131-
- Create _src/my_projects/projects-viewer_ bash script (unless exists) which
131+
- Create _src/my_projects/projects-viewer_ shell script (unless exists) which
132132
runs the Viewer with the previously created copy of _viewer.ts_ as the entry
133133
point.
134-
- Create _cmds/projects-viewer_ file as a symlink to the previously created
134+
- Create _cmds/projects-viewer_ shell script calling the previously created
135135
_projects-viewer_. This will cause the [_cmds/viewer_](../cmds/viewer) to
136136
run this file instead of [_cmds/demos-viewer_](../cmds/demos-viewer).
137137
- If the Docker container is running, stop it, as it will need to be recreated
138-
after the change of the main script.
138+
after the change of the script.
139139
- Add your projects to _src/my_projects/viewer.ts_.
140140
- [Start the Viewer](#starting-the-viewer). Your projects will be shown along
141141
with the demo projects (unless you delete them from

0 commit comments

Comments
 (0)