Make mycroft-core.sh invocable from outside
mycroft-core.sh has a relative-path call (that itself also likes to be called from inside mycroft-core) that prevents making a clean start of mycroft from outside the mycroft-core directory. This makes doing things like adding it as a Ubuntu Unity startup application slightly messy.pull/1049/head^2
parent
0bf3d9a668
commit
35c3af1e2c
|
@ -18,7 +18,16 @@ mycroft_root_dir='/opt/mycroft'
|
||||||
skills_dir="${mycroft_root_dir}"/skills
|
skills_dir="${mycroft_root_dir}"/skills
|
||||||
# exit on any error
|
# exit on any error
|
||||||
set -Ee
|
set -Ee
|
||||||
chmod +x msm/msm
|
|
||||||
|
SOURCE="${BASH_SOURCE[0]}"
|
||||||
|
while [ -h "$SOURCE" ]; do
|
||||||
|
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||||
|
SOURCE="$(readlink "$SOURCE")"
|
||||||
|
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
||||||
|
done
|
||||||
|
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||||
|
|
||||||
|
chmod +x ${DIR}/../msm/msm
|
||||||
|
|
||||||
# Determine which user is running this script
|
# Determine which user is running this script
|
||||||
setup_user=$USER
|
setup_user=$USER
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
SOURCE="${BASH_SOURCE[0]}"
|
||||||
|
|
||||||
script=${0}
|
script=${0}
|
||||||
script=${script##*/}
|
script=${script##*/}
|
||||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
SOURCE="${BASH_SOURCE[0]}"
|
||||||
|
|
||||||
script=${0}
|
script=${0}
|
||||||
script=${script##*/}
|
script=${script##*/}
|
||||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||||
|
|
Loading…
Reference in New Issue