diff options
Diffstat (limited to 'utils/bin')
-rwxr-xr-x | utils/bin/.gitignore | 7 | ||||
l--------- | utils/bin/activate | 1 | ||||
-rwxr-xr-x | utils/bin/activate.bash | 50 | ||||
-rwxr-xr-x | utils/bin/activate.cmd | 3 | ||||
l--------- | utils/bin/js | 1 | ||||
-rwxr-xr-x | utils/bin/narwhal | 48 | ||||
-rwxr-xr-x | utils/bin/narwhal.cmd | 29 | ||||
-rwxr-xr-x | utils/bin/sea | 36 | ||||
-rwxr-xr-x | utils/bin/sea.cmd | 26 | ||||
-rwxr-xr-x | utils/bin/tusk | 2 | ||||
-rwxr-xr-x | utils/bin/tusk.cmd | 1 |
11 files changed, 0 insertions, 204 deletions
diff --git a/utils/bin/.gitignore b/utils/bin/.gitignore deleted file mode 100755 index 5c9571b..0000000 --- a/utils/bin/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -appcfg.cmd -appcfg.sh -dev_appserver.cmd -dev_appserver.sh -fcgi-test.sh -jackup -narwhal-platform diff --git a/utils/bin/activate b/utils/bin/activate deleted file mode 120000 index c2a8369..0000000 --- a/utils/bin/activate +++ /dev/null @@ -1 +0,0 @@ -activate.bash
\ No newline at end of file diff --git a/utils/bin/activate.bash b/utils/bin/activate.bash deleted file mode 100755 index e3cf2c7..0000000 --- a/utils/bin/activate.bash +++ /dev/null @@ -1,50 +0,0 @@ - -if [ -z "${BASH_ARGV[0]}" ]; then - - # as a last recourse, use the present working directory - PACKAGE_HOME=$(pwd) - -else - - # get the absolute path of the executable - SELF_PATH=$( - cd -P -- "$(dirname -- "${BASH_ARGV[0]}")" \ - && pwd -P - ) && SELF_PATH=$SELF_PATH/$(basename -- "${BASH_ARGV[0]}") - - # resolve symlinks - while [ -h "$SELF_PATH" ]; do - DIR=$(dirname -- "$SELF_PATH") - SYM=$(readlink -- "$SELF_PATH") - SELF_PATH=$(cd -- "$DIR" && cd -- $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM") - done - - PACKAGE_HOME=$(dirname -- "$(dirname -- "$SELF_PATH")") - -fi - -export PACKAGE_HOME - -# which -s narwhal doesn't work (os x 10.5, kriskowal) -if [ -f "$PACKAGE_HOME"/bin/narwhal ]; then - NARWHAL="$PACKAGE_HOME"/bin/narwhal -elif [ -f "$PACKAGE_HOME"/packages/narwhal/bin/narwhal ]; then - NARWHAL="$PACKAGE_HOME"/packages/narwhal/bin/narwhal -else - env narwhal -e '' >/dev/null 2>&1 - if [ "$?" -ne 127 ]; then - NARWHAL=narwhal - else - echo "ERROR: narwhal is not in your PATH nor in $PACKAGE_HOME/bin." >&2 - fi -fi - -if [ -f "$PACKAGE_HOME"/narwhal.conf ]; then - source "$PACKAGE_HOME"/narwhal.conf - export NARWHAL_DEFAULT_PLATFORM -fi - -if [ "$NARWHAL" ]; then - export PATH="$("$NARWHAL" --package "$PACKAGE_HOME" --path :)" -fi - diff --git a/utils/bin/activate.cmd b/utils/bin/activate.cmd deleted file mode 100755 index 8619da8..0000000 --- a/utils/bin/activate.cmd +++ /dev/null @@ -1,3 +0,0 @@ -@echo off - -set PATH=%~dp0;%PATH% diff --git a/utils/bin/js b/utils/bin/js deleted file mode 120000 index c6f91aa..0000000 --- a/utils/bin/js +++ /dev/null @@ -1 +0,0 @@ -narwhal
\ No newline at end of file diff --git a/utils/bin/narwhal b/utils/bin/narwhal deleted file mode 100755 index 01fd4b1..0000000 --- a/utils/bin/narwhal +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -# get the absolute path of the executable -SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH="$SELF_PATH/$(basename -- "$0")" - -# resolve symlinks -while [ -h "$SELF_PATH" ]; do - DIR=$(dirname -- "$SELF_PATH") - SYM=$(readlink -- "$SELF_PATH") - SELF_PATH=$(cd -- "$DIR" && cd -- $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM") -done - -# NARWHAL_HOME is the 2nd ancestor directory of this shell script -NARWHAL_HOME=$(dirname -- "$(dirname -- "$SELF_PATH")") - -# use Rhino as the default if none is specified in narwhal.conf -NARWHAL_DEFAULT_PLATFORM="rhino" - -# load narwhal.conf if it exists -if [ -f "$NARWHAL_HOME/narwhal.conf" ]; then - source "$NARWHAL_HOME"/narwhal.conf -fi - -# if NARWHAL_PLATFORM isn't yet set, set it to the default platform, and export it -if [ -z "$NARWHAL_PLATFORM" ]; then - NARWHAL_PLATFORM=$NARWHAL_DEFAULT_PLATFORM -fi -export NARWHAL_HOME - -# build the executable name for the platform -EXECUTABLE_NAME="narwhal-$NARWHAL_PLATFORM" - -# search for the platform home directory -# try narwhal.conf setting -if [ "$NARWHAL_PLATFORM_HOME" ]; then - export NARWHAL_PLATFORM_HOME -# try relative -elif [ -f "$NARWHAL_HOME/platforms/$NARWHAL_PLATFORM/bin/$EXECUTABLE_NAME" ]; then - export NARWHAL_PLATFORM_HOME="$NARWHAL_HOME/platforms/$NARWHAL_PLATFORM" -# try $PATH -elif which -s "$EXECUTABLE_NAME"; then - export NARWHAL_PLATFORM_HOME=$(dirname -- "$(dirname -- "$EXECUTABLE_NAME")") -else - echo "Can't find executable for $NARWHAL_PLATFORM" - exit 1 -fi - -exec "$NARWHAL_PLATFORM_HOME"/bin/"$EXECUTABLE_NAME" "$@" diff --git a/utils/bin/narwhal.cmd b/utils/bin/narwhal.cmd deleted file mode 100755 index 98a9bfc..0000000 --- a/utils/bin/narwhal.cmd +++ /dev/null @@ -1,29 +0,0 @@ -@echo off -setlocal - -:: NARWHAL_HOME is the parent the bin directory -set NARWHAL_HOME=%~dp0.. - -:: use Rhino as the default if none is specified in narwhal.conf -set NARWHAL_DEFAULT_PLATFORM=rhino - -:: TODO: load narwhal.conf if it exists - -:: if NARWHAL_PLATFORM isn't yet set, set it to the default platform, and export it -if "%NARWHAL_PLATFORM%" == "" ( - set NARWHAL_PLATFORM=%NARWHAL_DEFAULT_PLATFORM% -) - -:: build the executable name for the platform -set EXECUTABLE_NAME=narwhal-%NARWHAL_PLATFORM%.cmd - -:: search for the platform home directory -:: TODO: look for more, including ".exe"? -if exist %NARWHAL_HOME%\platforms\%NARWHAL_PLATFORM%. ( - set NARWHAL_PLATFORM_HOME=%NARWHAL_HOME%\platforms\%NARWHAL_PLATFORM% -) else ( - echo "Can't find executable for $NARWHAL_PLATFORM" - exit -) - -call %NARWHAL_PLATFORM_HOME%\bin\%EXECUTABLE_NAME% %* diff --git a/utils/bin/sea b/utils/bin/sea deleted file mode 100755 index 13f7f52..0000000 --- a/utils/bin/sea +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# this script is intended to work both in narwhal/bin and in -# any project's bin dir; it's copied by tusk --init. - -# get the absolute path of the executable -SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0") - -# resolve symlinks -while [ -h "$SELF_PATH" ]; do - DIR=$(dirname -- "$SELF_PATH") - SYM=$(readlink -- "$SELF_PATH") - SELF_PATH=$(cd -- "$DIR" && cd -- $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM") -done - -export PACKAGE_HOME=$(dirname -- "$(dirname -- "$SELF_PATH")") - -source "$PACKAGE_HOME/bin/activate.bash" - -export OLDSEA="$SEA" -export SEA="$PACKAGE_HOME" -export SEALVL="$((SEALVL + 1))" - -if [ "$#" -lt 1 ]; then - echo PATH="$PATH" >&2 - echo SEA="$SEA" >&2 - echo SEALVL="$SEALVL" >&2 - "$SHELL" -else - "$SHELL" -c "$*" -fi -if [ "$OLDSEA" != "" ]; then - echo SEA="$OLDSEA" >&2 -fi -echo SEALVL="$((SEALVL - 1))" >&2 - diff --git a/utils/bin/sea.cmd b/utils/bin/sea.cmd deleted file mode 100755 index bf3f2ad..0000000 --- a/utils/bin/sea.cmd +++ /dev/null @@ -1,26 +0,0 @@ -@echo off -setlocal - -set SHELL=cmd.exe - -set PACKAGE_HOME=%~dp0\.. - -call %PACKAGE_HOME%\bin\activate.cmd - -set OLDSEA=%SEA% -set SEA=%PACKAGE_HOME% -set /a SEALVL=%SEALVL% + 1 - -if "%1" == "" ( - echo SEALVL=%SEALVL% - echo SEA=%SEA% - echo PATH=%PATH% - %SHELL% -) else ( -echo "asdfasdfadsf" - %SHELL% %* -) - -set /a SEALVL=%SEALVL% - 1 -echo SEALVL=%SEALVL% -echo SEA=%OLDSEA% diff --git a/utils/bin/tusk b/utils/bin/tusk deleted file mode 100755 index 85e2daf..0000000 --- a/utils/bin/tusk +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env narwhal -require('narwhal/tusk').main(system.args); diff --git a/utils/bin/tusk.cmd b/utils/bin/tusk.cmd deleted file mode 100755 index d6f225e..0000000 --- a/utils/bin/tusk.cmd +++ /dev/null @@ -1 +0,0 @@ -narwhal.cmd %~dpn0 %* |