Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add jlab CLI for snap #800

Merged
merged 3 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions electron-builder-scripts/snap-hooks/configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh -e

APP_PATH=$SNAP/jupyterlab-desktop
ln -s "$APP_PATH" /usr/bin/jlab
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbektas I would suggest adding -f as in my case, I already had /usr/bin/jlab for some reason and configure hook failed (which makes the installation to roll back completely):

ln -sf "$APP_PATH" /usr/bin/jlab

3 changes: 3 additions & 0 deletions electron-builder-scripts/snap-hooks/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh -e

rm /usr/bin/jlab
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@
"environment": {
"SHELL": "/bin/bash",
"GTK_USE_PORTAL":"1"
}
},
"hooks": "build/snap-hooks"
},
"win": {
"target": [
Expand Down
7 changes: 7 additions & 0 deletions scripts/copyassets.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ function copyAssests() {
),
path.join(buildDir, 'linux_after_install.sh')
);
fs.copySync(
path.join(path.resolve('./'), 'electron-builder-scripts', 'snap-hooks'),
path.join(buildDir, 'snap-hooks'),
{
recursive: true
}
);
}

console.log('done');
Expand Down
Loading