File: make_linux_desktop_shortcut.sh

package info (click to toggle)
python-bumps 1.0.0b2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,144 kB
  • sloc: python: 23,941; xml: 493; ansic: 373; makefile: 209; sh: 91; javascript: 90
file content (25 lines) | stat: -rwxr-xr-x 754 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

# This script creates a desktop shortcut for the Bumps webview server.
# The shortcut will be created in the user's desktop directory.
# the executable path is in 'env/bin/python'

# Get the user's desktop directory
desktop_dir=~/Desktop

# Get the path to the bumps webview server
script_dir=$(realpath $(dirname $0))

# Create the desktop shortcut
echo "[Desktop Entry]
Name=Bumps-Webview
Comment=Start the bumps webview server
Exec='$script_dir/env/bin/python' -m bumps.webview.server --use_persistent_path
Icon=$script_dir/env/share/icons/bumps.ico
Terminal=true
Type=Application
Categories=Development;
" > $desktop_dir/BumpsWebviewServer.desktop

# Make the desktop shortcut executable
chmod +x $desktop_dir/BumpsWebviewServer.desktop