mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-14 06:45:19 +00:00
init
This commit is contained in:
1 parent
ebfb0c6f96
commit
3fbfab4288
235 files changed
+30452
No files matched your search
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
# define newset arthas's version
|
||||
# need ../arthas-packages.sh replace the version number
|
||||
ARTHAS_VERSION=0.0
|
||||
|
||||
# define newset arthas lib home
|
||||
ARTHAS_LIB_HOME=${HOME}/.arthas/lib/${ARTHAS_VERSION}/arthas
|
||||
|
||||
# exit shell with err_code
|
||||
# $1 : err_code
|
||||
# $2 : err_msg
|
||||
exit_on_err()
|
||||
{
|
||||
[[ ! -z "${2}" ]] && echo "${2}" 1>&2
|
||||
exit ${1}
|
||||
}
|
||||
|
||||
# install to local if necessary
|
||||
if [[ ! -x ${ARTHAS_LIB_HOME} ]]; then
|
||||
|
||||
# install to local
|
||||
mkdir -p ${ARTHAS_LIB_HOME} \
|
||||
|| exit_on_err 1 "create target directory ${ARTHAS_LIB_HOME} failed."
|
||||
|
||||
# copy jar files
|
||||
cp *.jar ${ARTHAS_LIB_HOME}/
|
||||
|
||||
# make it -x
|
||||
chmod +x ./as.sh
|
||||
|
||||
fi
|
||||
|
||||
echo "install to local successed."
|
||||
|
||||
Reference in new issue
Block a user