aboutsummaryrefslogtreecommitdiffhomepage
path: root/osx
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-05-16 20:20:31 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-05-16 20:20:31 -0700
commite4e9f6f2213776dd666073cfef3654375de82244 (patch)
tree76d21150b537b40e1694a9e12246d940ab147d04 /osx
parent77ec902ca70b4da4556ececcf7ef2024955b0e63 (diff)
Added missing osx/install.sh for building fish.app
Diffstat (limited to 'osx')
-rwxr-xr-xosx/install.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/osx/install.sh b/osx/install.sh
new file mode 100755
index 00000000..44a79041
--- /dev/null
+++ b/osx/install.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# Die if anything has an error
+set -e
+
+# Make sure we're run as root
+scriptname=`basename "$0"`
+if [[ $UID -ne 0 ]]; then
+ echo "${scriptname} must be run as root"
+ exit 1
+fi
+
+# Set the prefix for installation
+PREFIX=/usr/local
+
+# Jump to the Resources directory
+cd "$(dirname "$0")"
+
+# Add us to the shells list
+./add-shell "${PREFIX}/bin/fish"
+
+# Ditto the base directory to the right place
+ditto ./base "${PREFIX}"
+
+# Announce our success
+echo "fish has been installed under ${PREFIX}/ and added to /etc/shells (if it was not already present)"
+echo "To start fish, run:"
+echo " ${PREFIX}/bin/fish"
+echo "If you wish to change your default shell to fish, run:"
+echo " chsh -s ${PREFIX}/bin/fish"
+echo "Enjoy!"