install.sh
来自「java操作excel的类」· Shell 代码 · 共 98 行
SH
98 行
#!/bin/bash --noprofiledirectory=/usr/local/binutils=utils.jarRandPass=RandPassLineEnds=LineEndsMD5=MD5SumTabs=TabsBase64=Base64if [ ! -z $1 ] then if [ "$1" == "--help" ] then echo "Install the ostermiller.org Java utilities." echo "-f force" exit 0 elif [ "$1" != "-f" ] then echo "Unknown option: $1" exit 1 fifiworkingdir=`pwd`if [ ! -e $workingdir/$utils ]then echo "Could not find '$utils'." echo "Make sure you execute this script from" echo "the directory that contains '$utils'." exit 1fiif [ ! -w "$directory" ]then directory=~/binfiif [ ! -w "$directory" ]then echo "You do not have permission to write in" echo "$directory" exit 1fiif [ ! -e $directory/$RandPass ] || [ ! -z $1 ]then echo "#!/bin/bash --noprofile" > $directory/$RandPass echo "java -classpath $workingdir/$utils com.Ostermiller.util.RandPass \"\$@\"" >> $directory/$RandPass chmod 755 $directory/$RandPass echo "$RandPass installed in $directory."else echo "$directory/$RandPass already exists. Use -f to overwrite."fiif [ ! -e $directory/$LineEnds ] || [ ! -z $1 ]then echo "#!/bin/bash --noprofile" > $directory/$LineEnds echo "java -classpath $workingdir/$utils com.Ostermiller.util.LineEnds \"\$@\"" >> $directory/$LineEnds chmod 755 $directory/$LineEnds echo "$LineEnds installed in $directory."else echo "$directory/$LineEnds already exists. Use -f to overwrite."fiif [ ! -e $directory/$MD5 ] || [ ! -z $1 ]then echo "#!/bin/bash --noprofile" > $directory/$MD5 echo "java -classpath $workingdir/$utils com.Ostermiller.util.MD5 \"\$@\"" >> $directory/$MD5 chmod 755 $directory/$MD5 echo "$MD5 installed in $directory."else echo "$directory/$MD5 already exists. Use -f to overwrite."fiif [ ! -e $directory/$Tabs ] || [ ! -z $1 ]then echo "#!/bin/bash --noprofile" > $directory/$Tabs echo "java -classpath $workingdir/$utils com.Ostermiller.util.Tabs \"\$@\"" >> $directory/$Tabs chmod 755 $directory/$Tabs echo "$Tabs installed in $directory."else echo "$directory/$Tabs already exists. Use -f to overwrite."fiif [ ! -e $directory/$Base64 ] || [ ! -z $1 ]then echo "#!/bin/bash --noprofile" > $directory/$Base64 echo "java -classpath $workingdir/$utils com.Ostermiller.util.Base64 \"\$@\"" >> $directory/$Base64 chmod 755 $directory/$Base64 echo "$Base64 installed in $directory."else echo "$directory/$Base64 already exists. Use -f to overwrite."fi
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?