[jitsi-dev] [jitsi] Support running run.sh from any current working directory (#212)


#1

When stable package installs to user's $HOME/jitsi, currently, run.sh starts successfully only when CWD is $HOME/jitsi.
Don't know for which other cases run.sh is used, please take care to check.
You can view, comment on, or merge this pull request online at:

  https://github.com/jitsi/jitsi/pull/212

-- Commit Summary --

  * Support running run.sh from any current working directory

-- File Changes --

    M resources/install/linux/run.sh (1)

-- Patch Links --

https://github.com/jitsi/jitsi/pull/212.patch
https://github.com/jitsi/jitsi/pull/212.diff

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi/pull/212


#2

I'm not sure if cd in a script is a good idea. @damencho ?

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi/pull/212#issuecomment-187941939


#3

I think it's better to run everything within the script relatively, e.g.:
export SCRIPTPATH=$( cd $(dirname $0) ; pwd -P )
then every subsequent relatively pathed script invocation/variable can be prefixed with SCRIPTPATH, and you don't trash your cwd. no pushd or popd, either.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi/pull/212#issuecomment-188468014


#4

@ibauersachs I agree with @narfman0, in jicofo and jvb we already have:
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi/pull/212#issuecomment-188469418


#5

@andrey-utkin could you please rework this to not use `cd`?

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi/pull/212#issuecomment-189945821


#6

Feel free to rework in any way you like without worries about my authorship.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi/pull/212#issuecomment-194383287


#7

I don't have time to work on this. Please reopen or create a new PR if you can do the changes as suggested in the comments.

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi/pull/212#issuecomment-218826696


#8

Closed #212.

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi/pull/212#event-658906157