WIP
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
set -
|
||||
|
||||
|
||||
jjCpmmandRunPoint=$(echo ${BASH_SOURCE[0]})
|
||||
|
||||
|
||||
|
||||
|
||||
function findJJSource {
|
||||
# @source http://stackoverflow.com/a/246128/330439
|
||||
local SOURCE="$jjCpmmandRunPoint"
|
||||
local DIR=""
|
||||
while [[ -h "$SOURCE" ]]; do
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
while [[ ! -e "${DIR}/jj.filelocation" ]]; do
|
||||
DIR=$(dirname "${DIR}")
|
||||
done
|
||||
echo "${DIR}"
|
||||
}
|
||||
|
||||
|
||||
export JJ_SOURCE_DIR=$(findJJSource)
|
||||
|
||||
if [[ -e ~/.bun/bin/bun ]]; then
|
||||
export PATH="~/.bun/bin:${PATH}"
|
||||
fi
|
||||
|
||||
__bunVersionExpect="1.1.34"
|
||||
__currentBunVersion=$(bun --version || true)
|
||||
if [[ "$__currentBunVersion" != "${__bunVersionExpect}" ]]; then
|
||||
rm -rf ~/.bun/bin/bun
|
||||
curl -fsSL https://bun.sh/install | bash -s "bun-v$__bunVersionExpect"
|
||||
export PATH="~/.bun/bin:${PATH}"
|
||||
fi
|
||||
|
||||
|
||||
mkdir -p "$JJ_SOURCE_DIR/~~tmp"
|
||||
|
||||
alias jj="$JJ_SOURCE_DIR/jj.sh"
|
||||
|
||||
|
||||
source "$JJ_SOURCE_DIR/bashUtils/index.sh"
|
||||
|
||||
# jjCliLog jjLog testjjLog a b c s
|
||||
# jjCliLog jjLogInfo testjjLogInfo
|
||||
# jjCliLog jjLogHeading testjjLogHeading
|
||||
|
||||
|
||||
export ASDF_DIR="$JJ_SOURCE_DIR/~~asdf_gc"
|
||||
export ASDF_DATA_DIR="$JJ_SOURCE_DIR/~~asdf_gc"
|
||||
export ASDF_VERSION=v0.14.1
|
||||
|
||||
|
||||
# if [[ ! -e $JJ_SOURCE_DIR/~~tmp/pa ]]; then
|
||||
# echo "asdadasd"
|
||||
# fi
|
||||
|
||||
|
||||
|
||||
|
||||
# $JJ_SOURCE_DIR/bin/run.ts $@
|
||||
Reference in New Issue
Block a user