-
Notifications
You must be signed in to change notification settings - Fork 40
/
parsec
23 lines (19 loc) · 909 Bytes
/
parsec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/sh
mkdir -p ~/.config/parsec
export XDG_CURRENT_DESKTOP=unknown
PYTHON=${SNAP}/usr/bin/python3
# The site-packages dir containing parsec and it dependencies is defined
# by `$SNAP/usr/lib/python3.6/sitecustomize.py` which use $SNAP environ
# variable for this. Given we are going to unset $SNAP, we replace it
# by $SNAPCRAFT_STAGE which is also used by this script.
export SNAPCRAFT_STAGE=$SNAP
# *Sob* sitecustomize.py has changed and now also requires
# $SNAPCRAFT_PART_INSTALL to be defined...
export SNAPCRAFT_PART_INSTALL=$SNAP
# SNAP env variable is used by Qt to determine we are within a sandbox
# and hence should use xdg-desktop-portal. However this is broken
# (see https://github.com/Scille/parsec-cloud/issues/702) so we bypass this
# and fallback to xdg-open which is fine given we use snap in classic mode
# (i.e. without sandbox).
unset SNAP
$PYTHON -I -m parsec.cli core gui $@