Skip to content

Instantly share code, notes, and snippets.

@CocoaBeans
Created April 7, 2014 18:02
Show Gist options
  • Select an option

  • Save CocoaBeans/10025711 to your computer and use it in GitHub Desktop.

Select an option

Save CocoaBeans/10025711 to your computer and use it in GitHub Desktop.

Revisions

  1. CocoaBeans created this gist Apr 7, 2014.
    7 changes: 7 additions & 0 deletions CurrentScriptPath.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    #!/bin/bash

    SCRIPT_PATH="${0}"
    SCRIPT_DIR=`dirname "${SCRIPT_PATH}"`
    SCRIPT_DIR=`cd "${SCRIPT_DIR}"; pwd`

    echo "$SCRIPT_DIR"