Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add a gatekeeper to ensure the script is only run by bash

  • Loading branch information...
commit 27703d620af3eeb37192a778aa914533451e93e8 1 parent 57d935f
@orefalo authored
Showing with 4 additions and 1 deletion.
  1. +2 −1  cmds/color.sh
  2. +2 −0  g2-install.sh
View
3  cmds/color.sh
@@ -1,6 +1,7 @@
+#!/bin/sh
g2_initializeANSI()
{
- g2esc="\033"
+ g2esc="\033";
blackf="${g2esc}[30m"; redf="${g2esc}[31m"; greenf="${g2esc}[32m";
yellowf="${g2esc}[33m"; bluef="${g2esc}[34m"; purplef="${g2esc}[35m";
View
2  g2-install.sh
@@ -2,6 +2,8 @@
#
# Call this program to install G2
+[ `basename $BASH` != "bash" ] && echo "G2 only supports bash at the moment, thank you for trying." && exit 1
+
# Figure the script HOME PATH
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
Please sign in to comment.
Something went wrong with that request. Please try again.