分享好友 最新动态首页 最新动态分类 切换频道
Kafka Tool linux版本,适用于kafka0.11及以上
2024-12-26 20:30
#!/bin/sh

Kafka Tool linux版本,适用于kafka0.11及以上

# Uncomment the following line to override the JVM search sequence # INSTALL4J_JAVA_HOME_OVERRIDE= # Uncomment the following line to add additional VM parameters # INSTALL4J_ADD_VM_PARAMS= INSTALL4J_JAVA_PREFIX="" GREP_OPTIONS="" read_db_entry() { if [ -n "$INSTALL4J_NO_DB" ]; then return 1 fi db_home=$HOME db_file_suffix= if [ ! -w "$db_home" ]; then db_home=/tmp db_file_suffix=_$USER fi db_file=$db_home/.install4j$db_file_suffix if [ -d "$db_file" ] || ([ -f "$db_file" ] && [ ! -r "$db_file" ]) || ([ -f "$db_file" ] && [ ! -w "$db_file" ]); then db_file=$db_home/.install4j_jre$db_file_suffix fi if [ ! -f "$db_file" ]; then return 1 fi if [ ! -x "$java_exc" ]; then return 1 fi found=1 exec 7< $db_file while read r_type r_dir r_ver_major r_ver_minor r_ver_micro r_ver_patch r_ver_vendor<&7; do if [ "$r_type" = "JRE_VERSION" ]; then if [ "$r_dir" = "$test_dir" ]; then ver_major=$r_ver_major ver_minor=$r_ver_minor ver_micro=$r_ver_micro ver_patch=$r_ver_patch fi elif [ "$r_type" = "JRE_INFO" ]; then if [ "$r_dir" = "$test_dir" ]; then is_openjdk=$r_ver_major found=0 break fi fi done exec 7<&- return $found } create_db_entry() { tested_jvm=true echo testing JVM in $test_dir ... version_output=`"$bin_dir/java" $1 -version 2>&1` is_gcj=`expr "$version_output" : '.*gcj'` is_openjdk=`expr "$version_output" : '.*OpenJDK'` if [ "$is_gcj" = "0" ]; then java_version=`expr "$version_output" : '.*"(.*)".*'` ver_major=`expr "$java_version" : '([0-9][0-9]*)..*'` ver_minor=`expr "$java_version" : '[0-9][0-9]*.([0-9][0-9]*)..*'` ver_micro=`expr "$java_version" : '[0-9][0-9]*.[0-9][0-9]*.([0-9][0-9]*).*'` ver_patch=`expr "$java_version" : '[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*[._]([0-9][0-9]*).*'` fi if [ "$ver_patch" = "" ]; then ver_patch=0 fi if [ -n "$INSTALL4J_NO_DB" ]; then return fi db_new_file=${db_file}_new if [ -f "$db_file" ]; then awk '$1 != "'"$test_dir"'" {print $0}' $db_file > $db_new_file rm $db_file mv $db_new_file $db_file fi dir_escaped=`echo "$test_dir" | sed -e 's/ /\\ /g'` echo "JRE_VERSION $dir_escaped $ver_major $ver_minor $ver_micro $ver_patch" >> $db_file echo "JRE_INFO $dir_escaped $is_openjdk" >> $db_file } test_jvm() { tested_jvm=na test_dir=$1 bin_dir=$test_dir/bin java_exc=$bin_dir/java if [ -z "$test_dir" ] || [ ! -d "$bin_dir" ] || [ ! -f "$java_exc" ] || [ ! -x "$java_exc" ]; then return fi tested_jvm=false read_db_entry || create_db_entry $2 if [ "$ver_major" = "" ]; then return; fi if [ "$ver_major" -lt "1" ]; then return; elif [ "$ver_major" -eq "1" ]; then if [ "$ver_minor" -lt "8" ]; then return; fi fi if [ "$ver_major" = "" ]; then return; fi if [ "$ver_major" -gt "1" ]; then return; elif [ "$ver_major" -eq "1" ]; then if [ "$ver_minor" -gt "8" ]; then return; fi fi app_java_home=$test_dir } add_class_path() { if [ -n "$1" ] && [ `expr "$1" : '.**'` -eq "0" ]; then local_classpath="$local_classpath${local_classpath:+:}$1" fi } compiz_workaround() { if [ "$is_openjdk" != "0" ]; then return; fi if [ "$ver_major" = "" ]; then return; fi if [ "$ver_major" -gt "1" ]; then return; elif [ "$ver_major" -eq "1" ]; then if [ "$ver_minor" -gt "6" ]; then return; elif [ "$ver_minor" -eq "6" ]; then if [ "$ver_micro" -gt "0" ]; then return; elif [ "$ver_micro" -eq "0" ]; then if [ "$ver_patch" -gt "09" ]; then return; fi fi fi fi osname=`uname -s` if [ "$osname" = "Linux" ]; then compiz=`ps -ef | grep -v grep | grep compiz` if [ -n "$compiz" ]; then export AWT_TOOLKIT=MToolkit fi fi } read_vmoptions() { vmoptions_file=`eval echo "$1" 2>/dev/null` if [ ! -r "$vmoptions_file" ]; then vmoptions_file="$prg_dir/$vmoptions_file" fi if [ -r "$vmoptions_file" ] && [ -f "$vmoptions_file" ]; then exec 8< "$vmoptions_file" while read cur_option<&8; do is_comment=`expr "W$cur_option" : 'W *#.*'` if [ "$is_comment" = "0" ]; then vmo_classpath=`expr "W$cur_option" : 'W *-classpath (.*)'` vmo_classpath_a=`expr "W$cur_option" : 'W *-classpath/a (.*)'` vmo_classpath_p=`expr "W$cur_option" : 'W *-classpath/p (.*)'` vmo_include=`expr "W$cur_option" : 'W *-include-options (.*)'` if [ ! "$vmo_classpath" = "" ]; then local_classpath="$i4j_classpath:$vmo_classpath" elif [ ! "$vmo_classpath_a" = "" ]; then local_classpath="${local_classpath}:${vmo_classpath_a}" elif [ ! "$vmo_classpath_p" = "" ]; then local_classpath="${vmo_classpath_p}:${local_classpath}" elif [ "$vmo_include" = "" ]; then if [ "W$vmov_1" = "W" ]; then vmov_1="$cur_option" elif [ "W$vmov_2" = "W" ]; then vmov_2="$cur_option" elif [ "W$vmov_3" = "W" ]; then vmov_3="$cur_option" elif [ "W$vmov_4" = "W" ]; then vmov_4="$cur_option" elif [ "W$vmov_5" = "W" ]; then vmov_5="$cur_option" else vmoptions_val="$vmoptions_val $cur_option" fi fi fi done exec 8<&- if [ ! "$vmo_include" = "" ]; then read_vmoptions "$vmo_include" fi fi } unpack_file() { if [ -f "$1" ]; then jar_file=`echo "$1" | awk '{ print substr($0,1,length-5) }'` bin/unpack200 -r "$1" "$jar_file" if [ $? -ne 0 ]; then echo "Error unpacking jar files. The architecture or bitness (32/64)" echo "of the bundled JVM might not match your machine." returnCode=1 cd "$old_pwd" if [ ! "W $INSTALL4J_KEEP_TEMP" = "W yes" ]; then rm -R -f "$sfx_dir_name" fi exit $returnCode fi fi } run_unpack200() { if [ -f "$1/lib/rt.jar.pack" ]; then old_pwd200=`pwd` cd "$1" echo "Preparing JRE ..." for pack_file in lib.*' > /dev/null; then prg="$link" else prg="`dirname $prg`/$link" fi done prg_dir=`dirname "$prg"` progname=`basename "$prg"` cd "$prg_dir" prg_dir=`pwd` app_home=. cd "$app_home" app_home=`pwd` bundled_jre_home="$app_home/jre" if [ "__i4j_lang_restart" = "$1" ]; then cd "$old_pwd" else cd "$prg_dir"/. gunzip -V > /dev/null 2>&1 if [ "$?" -ne "0" ]; then echo "Sorry, but I could not find gunzip in path. Aborting." exit 1 fi if [ -d "$INSTALL4J_TEMP" ]; then sfx_dir_name="$INSTALL4J_TEMP/${progname}.$$.dir" else sfx_dir_name="${progname}.$$.dir" fi mkdir "$sfx_dir_name" > /dev/null 2>&1 if [ ! -d "$sfx_dir_name" ]; then sfx_dir_name="/tmp/${progname}.$$.dir" mkdir "$sfx_dir_name" if [ ! -d "$sfx_dir_name" ]; then echo "Could not create dir $sfx_dir_name. Aborting." exit 1 fi fi cd "$sfx_dir_name" if [ "$?" -ne "0" ]; then echo "The temporary directory could not created due to a malfunction of the cd command. Is the CDPATH variable set without a dot?" exit 1 fi sfx_dir_name=`pwd` if [ "W$old_pwd" = "W$sfx_dir_name" ]; then echo "The temporary directory could not created due to a malfunction of basic shell commands." exit 1 fi trap 'cd "$old_pwd"; rm -R -f "$sfx_dir_name"; exit 1' HUP INT QUIT TERM tail -c 869117 "$prg_dir/${progname}" > sfx_archive.tar.gz 2> /dev/null if [ "$?" -ne "0" ]; then
最新文章
Sora AI基础知识:通过PR和AE革新视频编辑
在这门全面的课程中,我们将释放 Sora AI 在视频编辑工作流程中的潜力,为创作者和专业人士提供实用的技巧和策略。你将学习如何高效地将尖端 AI 技术与 Adobe Premiere Pro 和 After Effects 相结合,以提升你的项目质量。无论是优化工作流
脏脏漫:创新漫画形式打破传统的极限,挑战社会文化禁忌
近年来,脏脏漫这一类型的漫画逐渐崭露头角,吸引了大量年轻读者的关注。与传统的漫画风格不同,脏脏漫在题材和表现手法上都有着大胆的创新。它通常呈现一种低俗、恶搞甚至黑暗幽默的氛围,内容常常涉及一些社会热点话题或者夸张的生活场景
公共基础知识常识大全下载,一站式知识宝库获取指南
摘要:,,通过下载公共基础知识常识大全,您将能够一站式获取知识的宝库。这本书籍集结了广泛领域的基础知识,包括文化、科技、历史、地理、经济等多个方面。无论您是学术研究者、学生还是终身学习者,都可以从中获取所需的知识和见解。这
老河口房屋漏水维修〈免费上门〉老河口市厨卫防水补漏
不砸砖、不砸墙;免砸砖防水补漏技术,2小时快速解决漏水问题,超长保修期。漏水维修服务项目:防水堵漏、阳台漏水、防水查漏、洗浴间漏水、飘窗渗水、屋面防水补漏、厂房漏水维修、漏水检测、房顶漏水、房屋墙面起皮、天花板渗水、女儿墙渗水
闪烁之光手游云手机多开挂机搬砖赚钱
《闪烁之光》是一款"开局十连必出五星,白嫖也能躺赢"的放置策略回合制卡牌手游,超好用的“多战斗切换模式”,带给玩家集休闲、养成、策略、交互于一体的良心手游。闪烁之光游戏搬砖赚钱需要至少4个号,一个大号三个小号才有效率,所以手
【Blaze美图秀秀下载】华为Blaze美图秀秀10.6.0免费下载
全球超受欢迎的宝藏App!美图配方,一键出片!安卓装机必备!大牌明星达人都爱用的高清修图剪片法宝!===美图AI 玩转数字世界===【AI绘画】火遍全网的二次元变身神器,免关键词也无需排队,驯服AI超简单!【AI动漫】真人视频一键变动漫,穿
重庆永川万达广场(永川店)附近停车场攻略、停哪里最方便
车库名称(搜导航)车库信息收费标准地址
智能AI医疗机器人服务群体
引言:在当今快速发展的科技时代,智能AI医疗机器人服务群体正逐渐崭露头角。这一群体由具备人工智能技术的机器人组成,能够提供各种智能化的医疗服务。本文将从定义、分类、举例和比较等方面介绍智能AI医疗机器人服务群体的相关知识。正文
掌握 Google 趋势来改善你的 SEO
  掌握最新动态并击败竞争对手意味着掌握趋势和消费者行为。多年来,Google 悄悄开发了一种工具,该工具已成为许多 SEO 工具包中的主打产品:Google Trends。该工具提供了有关人们正在搜索的内容的宝贵见解。Google Trends 的最新更新带
轻松搭建宝典,一站式搭建工具指南
轻松搭建,本指南提供一站式搭建服务,涵盖从到设计、内容管理及SEO优化等全方位教程,助您快速创建并优化。搭建工具概览搭建工具精选推荐搭建关键事项在互联网日益深入的今天,企业和个人纷纷认识到构建个人的重要性,搭建并非易事,尤其
相关文章
推荐文章
发表评论
0评