Sha256: 2f4850f6997ef3e883be51e3c3aaa5847c302a75ebbc747f2f1b5e88bc2fcbef

Contents?: true

Size: 1.2 KB

Versions: 1

Compression:

Stored size: 1.2 KB

Contents

#!/usr/bin/env bash 
if [ ! -z $BOOTER_DKLET_RC ];then
  if [ -z $FORCE_RC ]; then
    echo Warning: has sourced $BOOTER_DKLET_RC!
    return 1 
  fi
fi
BOOTER_DKLET_RC=$( ruby -e "puts File.realpath('${BASH_SOURCE[0]}')")
BOOTER_DKLET_HOME=$(dirname $BOOTER_DKLET_RC)

export PATH=$PATH:$BOOTER_DKLET_HOME/exe

function dklet(){
  tp=${1:-cd}
  case "$tp" in
    rc|file)
      echo "$BOOTER_DKLET_RC"
      ;;
    home|root)
      echo $BOOTER_DKLET_HOME
      ;;
    cd)
      cd "$BOOTER_DKLET_HOME"
      ;;
    edit|vi)
      vi "$BOOTER_DKLET_RC"
      $FUNCNAME reload
      ;;
    show)
      cat "$BOOTER_DKLET_RC"
      ;;
    reload|source)
      FORCE_RC=1 source "$BOOTER_DKLET_RC"
      echo ==has sourced "$BOOTER_DKLET_RC"
      ;;
    help|h)
      echo rc file: "$BOOTER_DKLET_RC"
      type $FUNCNAME 
      ;;

    ## app related
    gem)
      gem query dklet -l
      ;;
    gemrelease)
      $FUNCNAME cd && rake release
      ;;
    gemup)
      $FUNCNAME cd && rake install:local --trace
      ;;
    gemdown)
      gem uninstall dklet --all -x
      ;;
    status|st)
      type -a rundklet
      ;;
    test)
      $FUNCNAME cd && rake test
      ;;
    *)
      $FUNCNAME help
      ;;
  esac
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dklet-0.1.3 dklet.rc