Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagesmc
Path: blob/master/src/mac-app/open-location.sh
8817 views
1
#!/bin/bash
2
3
# open-location.sh
4
# Sage
5
#
6
# Created by Ivan Andrus on 16/1/10.
7
# Copyright 2010 Ivan Andrus. All rights reserved.
8
9
if [ "x$1" = "x" ]; then
10
echo "usage: $0 URL"
11
echo " open URL in SageNotebook"
12
exit
13
fi
14
15
# Find path to this app
16
BROWSER=`readlink -n "$0" 2> /dev/null` || \
17
BROWSER=`realpath "$0" 2> /dev/null` || \
18
BROWSER="$0"
19
BROWSER="${SAGE_BROWSER%.app*}.app"
20
21
# Tell it to open in this browser
22
open -a "$BROWSER" "$1"
23
24