📄 install.sh
字号:
#!/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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -