From d5c9df69d0a0ded31ae7db92877e5ed6306c0865 Mon Sep 17 00:00:00 2001 From: Jerry Lee Date: Mon, 2 Dec 2019 13:12:31 +0800 Subject: [PATCH] normalize directory structure: bin, lib, doc, etc #87 --- README.md | 2 +- a2l => bin/a2l | 2 +- ap => bin/ap | 2 +- c => bin/c | 2 +- coat => bin/coat | 2 +- bin/console-text-color-themes | 1 + echo-args => bin/echo-args | 2 +- find-in-jars => bin/find-in-jars | 2 +- rp => bin/rp | 4 ++-- .../show-busy-java-threads | 2 +- .../show-duplicate-java-classes | 2 +- .../tcp-connection-state-counter | 2 +- xpf => bin/xpf | 2 +- xpl => bin/xpl | 2 +- colines | 1 - docs/install.md | 24 +++++++++---------- docs/java.md | 6 ++--- docs/shell.md | 21 ++++++++-------- docs/vcs.md | 6 ++--- echo-args.sh | 1 - find-in-jars.sh | 1 - cp-svn-url.sh => legacy-bin/cp-svn-url.sh | 2 +- .../svn-merge-stop-on-copy.sh | 2 +- swtrunk.sh => legacy-bin/swtrunk.sh | 2 +- .../console-text-color-themes.sh | 2 +- parseOpts.sh => lib/parseOpts.sh | 2 +- show-busy-java-threads.sh | 1 - tcp-connection-state-counter.sh | 1 - test-cases/parseOpts-test.sh | 2 +- test-cases/self-installer.sh | 4 ++-- 30 files changed, 51 insertions(+), 56 deletions(-) rename a2l => bin/a2l (88%) rename ap => bin/ap (81%) rename c => bin/c (96%) rename coat => bin/coat (90%) create mode 120000 bin/console-text-color-themes rename echo-args => bin/echo-args (85%) rename find-in-jars => bin/find-in-jars (98%) rename rp => bin/rp (84%) rename show-busy-java-threads => bin/show-busy-java-threads (99%) rename show-duplicate-java-classes => bin/show-duplicate-java-classes (97%) rename tcp-connection-state-counter => bin/tcp-connection-state-counter (80%) rename xpf => bin/xpf (71%) rename xpl => bin/xpl (95%) delete mode 120000 colines delete mode 120000 echo-args.sh delete mode 120000 find-in-jars.sh rename cp-svn-url.sh => legacy-bin/cp-svn-url.sh (91%) rename svn-merge-stop-on-copy.sh => legacy-bin/svn-merge-stop-on-copy.sh (95%) rename swtrunk.sh => legacy-bin/swtrunk.sh (91%) rename console-text-color-themes.sh => lib/console-text-color-themes.sh (94%) rename parseOpts.sh => lib/parseOpts.sh (99%) delete mode 120000 show-busy-java-threads.sh delete mode 120000 tcp-connection-state-counter.sh diff --git a/README.md b/README.md index d7f2e8e6..fdde70ef 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ PS: ---------------------- ```bash -source <(curl -fsSL https://raw.githubusercontent.com/oldratlee/useful-scripts/master/test-cases/self-installer.sh) +source <(curl -fsSL https://raw.githubusercontent.com/oldratlee/useful-scripts/release-2.x/test-cases/self-installer.sh) ``` 更多下载&使用方式,参见[下载使用](docs/install.md)。 diff --git a/a2l b/bin/a2l similarity index 88% rename from a2l rename to bin/a2l index 8ecbd5d9..caca085b 100755 --- a/a2l +++ b/bin/a2l @@ -6,7 +6,7 @@ # $ ./a2l arg1 arg2 # $ ./a2l *.txt # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/shell.md#-a2l +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-a2l # @author Jerry Lee (oldratlee at gmail dot com) diff --git a/ap b/bin/ap similarity index 81% rename from ap rename to bin/ap index 33ff6fba..925e4d52 100755 --- a/ap +++ b/bin/ap @@ -8,7 +8,7 @@ # # print Absolute Path of arguments. # $ ./ap a.txt ../dir1/b.txt # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/shell.md#-ap-and-rp +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-ap-and-rp # @author Jerry Lee (oldratlee at gmail dot com) [ $# -eq 0 ] && files=(.) || files=("$@") diff --git a/c b/bin/c similarity index 96% rename from c rename to bin/c index f7d6d80c..e18e11e0 100755 --- a/c +++ b/bin/c @@ -6,7 +6,7 @@ # $ c echo "hello world!" # $ echo "hello world!" | c # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/shell.md#-c +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-c # @author Jerry Lee (oldratlee at gmail dot com) set -e diff --git a/coat b/bin/coat similarity index 90% rename from coat rename to bin/coat index ef3f06d8..6ab5e1a7 100755 --- a/coat +++ b/bin/coat @@ -7,7 +7,7 @@ # $ coat /path/to/file1 # $ coat /path/to/file1 /path/to/file2 # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/shell.md#-coat +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-coat # @author Jerry Lee (oldratlee at gmail dot com) set -e diff --git a/bin/console-text-color-themes b/bin/console-text-color-themes new file mode 120000 index 00000000..334c2f39 --- /dev/null +++ b/bin/console-text-color-themes @@ -0,0 +1 @@ +../lib/console-text-color-themes.sh \ No newline at end of file diff --git a/echo-args b/bin/echo-args similarity index 85% rename from echo-args rename to bin/echo-args index 7562b7c6..a0407511 100755 --- a/echo-args +++ b/bin/echo-args @@ -2,7 +2,7 @@ # @Function # print arguments in human and debugging friendly style. # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/shell.md#-echo-args +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-echo-args # @author Jerry Lee (oldratlee at gmail dot com) readonly ec=$'\033' # escape char diff --git a/find-in-jars b/bin/find-in-jars similarity index 98% rename from find-in-jars rename to bin/find-in-jars index 0571a804..ec655779 100755 --- a/find-in-jars +++ b/bin/find-in-jars @@ -11,7 +11,7 @@ # $ find-in-jars 'Service\.class$' -e jar -e zip # $ find-in-jars 'Mon[^$/]*Service\.class$' -s ' <-> ' # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/java.md#-find-in-jars +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/java.md#-find-in-jars # @author Jerry Lee (oldratlee at gmail dot com) readonly PROG="`basename "$0"`" diff --git a/rp b/bin/rp similarity index 84% rename from rp rename to bin/rp index d4b0739d..efb69ee6 100755 --- a/rp +++ b/bin/rp @@ -8,7 +8,7 @@ # # if more than 1 argument, print relative path to last argument. # $ ./rp a.txt ../b.txt /etc/passwd /etc/apache2 # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/shell.md#-ap-and-rp +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-ap-and-rp # @author Jerry Lee (oldratlee at gmail dot com) [ $# -eq 0 ] && { @@ -35,5 +35,5 @@ for f in "${files[@]}" ; do echo "$f does not exists!" continue } - realpath "$f" --relative-to="$relativeTo" + realpath "$f" --relative-to="$relativeTo" done diff --git a/show-busy-java-threads b/bin/show-busy-java-threads similarity index 99% rename from show-busy-java-threads rename to bin/show-busy-java-threads index 02e91520..3d94153f 100755 --- a/show-busy-java-threads +++ b/bin/show-busy-java-threads @@ -5,7 +5,7 @@ # @Usage # $ ./show-busy-java-threads # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/java.md#-show-busy-java-threads +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/java.md#-show-busy-java-threads # @author Jerry Lee (oldratlee at gmail dot com) # @author superhj1987 (superhj1987 at 126 dot com) diff --git a/show-duplicate-java-classes b/bin/show-duplicate-java-classes similarity index 97% rename from show-duplicate-java-classes rename to bin/show-duplicate-java-classes index 66c868d2..e49c78aa 100755 --- a/show-duplicate-java-classes +++ b/bin/show-duplicate-java-classes @@ -8,7 +8,7 @@ # $ show-duplicate-java-classes path/to/lib_dir1 /path/to/lib_dir2 # $ show-duplicate-java-classes -c path/to/class_dir1 -c /path/to/class_dir2 # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/java.md#-show-duplicate-java-classes +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/java.md#-show-duplicate-java-classes # @author tg123 (farmer1992 at gmail dot com) # @author Jerry Lee (oldratlee at gmail dot com) diff --git a/tcp-connection-state-counter b/bin/tcp-connection-state-counter similarity index 80% rename from tcp-connection-state-counter rename to bin/tcp-connection-state-counter index 47855d20..86b60351 100755 --- a/tcp-connection-state-counter +++ b/bin/tcp-connection-state-counter @@ -5,7 +5,7 @@ # @Usage # $ ./tcp-connection-state-counter # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/shell.md#-tcp-connection-state-counter +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-tcp-connection-state-counter # @author Jerry Lee (oldratlee at gmail dot com) # @author @sunuslee (sunuslee at gmail dot com) diff --git a/xpf b/bin/xpf similarity index 71% rename from xpf rename to bin/xpf index a51e9831..2e4ba51a 100755 --- a/xpf +++ b/bin/xpf @@ -6,7 +6,7 @@ # @Usage # $ ./xpf file # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/shell.md#-xpl-and-xpf +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-xpl-and-xpf # @author Jerry Lee (oldratlee at gmail dot com) BASE="$(dirname "$0")" diff --git a/xpl b/bin/xpl similarity index 95% rename from xpl rename to bin/xpl index adafa351..b79bd271 100755 --- a/xpl +++ b/bin/xpl @@ -5,7 +5,7 @@ # @Usage # $ ./xpf [file [file ...] ] # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/shell.md#-xpl-and-xpf +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-xpl-and-xpf # @author Jerry Lee (oldratlee at gmail dot com) PROG=`basename $0` diff --git a/colines b/colines deleted file mode 120000 index 98505f2e..00000000 --- a/colines +++ /dev/null @@ -1 +0,0 @@ -coat \ No newline at end of file diff --git a/docs/install.md b/docs/install.md index 42bdad32..5ef3b633 100644 --- a/docs/install.md +++ b/docs/install.md @@ -14,7 +14,7 @@ git clone git://github.com/oldratlee/useful-scripts.git cd useful-scripts # 使用Release分支的内容 -git checkout release +git checkout release-2.x # 更新脚本 git pull @@ -22,13 +22,13 @@ git pull 包含2个分支: -- `master`:开发分支 -- `release`:发布分支,功能稳定的脚本 +- `dev-2.x`:开发分支 +- `release-2.x`:发布分支,功能稳定的脚本 -当然如果你不想安装`git`,`github`是支持`svn`的: +当然如果你不想安装`git`,`github`是支持`svn`的: ```bash -svn co https://github.com/oldratlee/useful-scripts/branches/release +svn co https://github.com/oldratlee/useful-scripts/branches/release-2.x cd useful-scripts @@ -37,33 +37,33 @@ svn up ``` PS: -我的做法是把`useful-scripts` checkout到`$HOME/bin/useful-scripts`目录下,再把`$HOME/bin/useful-scripts`配置到`PATH`变量上,这样方便我本地使用所有的脚本。 +我的做法是把`useful-scripts` checkout到`$HOME/bin`目录下,再把`$HOME/bin/useful-scripts/bin`配置到`PATH`变量上,这样方便我本地使用所有的脚本。 ### 打包下载 -下载文件[release.zip](https://github.com/oldratlee/useful-scripts/archive/release.zip): +下载文件[release-2.x.zip](https://github.com/oldratlee/useful-scripts/archive/release-2.x.zip): ```bash -wget --no-check-certificate https://github.com/oldratlee/useful-scripts/archive/release.zip +wget --no-check-certificate https://github.com/oldratlee/useful-scripts/archive/release-2.x.zip -unzip release.zip +unzip release-2.x.zip ``` 下载和运行单个文件 ------------------- -以[`show-busy-java-threads`](https://raw.github.com/oldratlee/useful-scripts/release/show-busy-java-threads)为例。 +以[`show-busy-java-threads`](https://raw.github.com/oldratlee/useful-scripts/release-2.x/bin/show-busy-java-threads)为例。 ### `curl`文件直接用`bash`运行 ```bash -curl -sLk 'https://raw.github.com/oldratlee/useful-scripts/release/show-busy-java-threads' | bash +curl -sLk 'https://raw.github.com/oldratlee/useful-scripts/release-2.x/bin/show-busy-java-threads' | bash ``` ### 下载单个文件 ```bash -wget --no-check-certificate https://raw.github.com/oldratlee/useful-scripts/release/show-busy-java-threads +wget --no-check-certificate https://raw.github.com/oldratlee/useful-scripts/release-2.x/bin/show-busy-java-threads chmod +x show-busy-java-threads ./show-busy-java-threads diff --git a/docs/java.md b/docs/java.md index 41faf9d0..359dcedf 100644 --- a/docs/java.md +++ b/docs/java.md @@ -47,7 +47,7 @@ -🍺 [show-busy-java-threads](../show-busy-java-threads) +🍺 [show-busy-java-threads](../bin/show-busy-java-threads) ---------------------- 用于快速排查`Java`的`CPU`性能问题(`top us`值过高),自动查出运行的`Java`进程中消耗`CPU`多的线程,并打印出其线程栈,从而确定导致性能问题的方法调用。 @@ -222,7 +222,7 @@ $ show-busy-java-threads - 发现并提交Issue:在`top v3.2`下提取不正确的Bug [#71](https://github.com/oldratlee/useful-scripts/issues/71) - 发现并提交Issue:support command name jsvc to find java process [#72](https://github.com/oldratlee/useful-scripts/issues/72) -🍺 [show-duplicate-java-classes](../show-duplicate-java-classes) +🍺 [show-duplicate-java-classes](../bin/show-duplicate-java-classes) ---------------------- 找出`Java Lib`(`Java`库,即`Jar`文件)或`Class`目录(类目录)中的重复类。 @@ -385,7 +385,7 @@ class paths to find: -🍺 [find-in-jars](../find-in-jars) +🍺 [find-in-jars](../bin/find-in-jars) ---------------------- 在当前目录下所有`jar`文件里,查找类或资源文件。 diff --git a/docs/shell.md b/docs/shell.md index 30286314..f1df0781 100644 --- a/docs/shell.md +++ b/docs/shell.md @@ -44,7 +44,7 @@ `Shell`使用加强 ==================================== -🍺 [c](../c) +🍺 [c](../bin/c) ---------------------- 原样命令行输出,并拷贝标准输出到系统剪贴板,省去`CTRL+C`操作,优化命令行与其它应用之间的操作流。 @@ -113,7 +113,7 @@ Options: - [拷贝复制命令行输出放在系统剪贴板上](http://oldratlee.com/post/2012-12-23/command-output-to-clip),给出了不同系统可用命令。 - 关于文本文件最后的换行,参见[Why should text files end with a newline?](https://stackoverflow.com/questions/729692) -🍺 [coat](../coat) +🍺 [coat](../bin/coat) ---------------------- 彩色`cat`出文件行,方便人眼区分不同的行。 @@ -121,8 +121,7 @@ Options: 命令支持选项、功能和使用方式与[`cat`命令](https://linux.die.net/man/1/cat)完全一样(实际上读流操作在实现上全部代理给`cat`命令)。 -命令名`coat`意思是`COlorful cAT`;当然单词`coat`的意思是外套,彩色输入行就像件漂亮的外套~ 😆 -注:之前命名是`colines`(意思是`COLorful LINES`)。 +命令名`coat`意思是`COlorful cAT`;当然单词`coat`的意思是外套,彩色输入行就像件漂亮的外套~ 😆 ### 示例 @@ -176,7 +175,7 @@ or available locally via: info '(coreutils) cat invocation' 注:上面示例中,没有彩色;在控制台上运行可以看出彩色效果,如下: ![coat screenshot](../docs/coat.png) -🍺 [a2l](../a2l) +🍺 [a2l](../bin/a2l) ---------------------- 按行彩色输出参数,方便人眼查看。 @@ -204,7 +203,7 @@ test-cases/self-installer.sh 注:上面示例中,没有彩色;在控制台上运行可以看出彩色效果,和上面的`coat`命令一样。 -🍺 [ap](../ap) and [rp](../rp) +🍺 [ap](../bin/ap) and [rp](../bin/rp) ---------------------- 批量转换文件路径为绝对路径/相对路径,会自动跟踪链接并规范化路径。 @@ -239,7 +238,7 @@ $ rp /home /etc/../etc /home/admin -🍺 [tcp-connection-state-counter](../tcp-connection-state-counter) +🍺 [tcp-connection-state-counter](../bin/tcp-connection-state-counter) ---------------------- 统计各个`TCP`连接状态的个数。 @@ -270,7 +269,7 @@ SYN_SENT 17 [sunuslee](https://github.com/sunuslee)改进此脚本,增加对`MacOS`的支持。 [#56](https://github.com/oldratlee/useful-scripts/pull/56) -🍺 [xpl](../xpl) and [xpf](../xpf) +🍺 [xpl](../bin/xpl) and [xpf](../bin/xpf) ---------------------- 在命令行中快速完成 在文件浏览器中 打开/选中 指定的文件或文件夹的操作,优化命令行与其它应用之间的操作流。 @@ -315,7 +314,7 @@ xpf /path/to/dir1 /path/to/foo1.txt -🍺 [echo-args](../echo-args) +🍺 [echo-args](../bin/echo-args) ---------------------- 在编写脚本时,常常要确认输入参数是否是期望的:参数个数,参数值(可能包含有人眼不容易发现的空格问题)。 @@ -342,7 +341,7 @@ $ ./echo-args 1 " 2 foo " "3 3" 这样可以不改其它的程序,查看到输入参数的信息。 -🍺 [console-text-color-themes.sh](../console-text-color-themes.sh) +🍺 [console-text-color-themes.sh](../lib/console-text-color-themes.sh) ---------------------- 显示`Terminator`的全部文字彩色组合的效果及其打印方式。 @@ -380,7 +379,7 @@ colorEchoWithoutNewLine "4;33;40" "Hello world!" "Hello Hell!" - [utensil](https://github.com/utensil)的[在Bash下输出彩色的文本](http://utensil.github.io/tech/2007/09/10/colorful-bash.html),这是篇很有信息量很钻研的文章! -🍺 [parseOpts.sh](../parseOpts.sh) +🍺 [parseOpts.sh](../lib/parseOpts.sh) ---------------------- 命令行选项解析库,加强支持选项有多个值(即数组)。 diff --git a/docs/vcs.md b/docs/vcs.md index ff3925d8..584eb632 100644 --- a/docs/vcs.md +++ b/docs/vcs.md @@ -20,7 +20,7 @@ 拷贝当前`svn`目录对应的远程分支到系统的粘贴板,省去`CTRL+C`操作。 PS:`Git`分支不需要`URL`来引用,没有这个脚本的需求,直接给个分支名就好了。 -🍺 [swtrunk.sh](../swtrunk.sh) +🍺 [swtrunk.sh](../legacy-bin/swtrunk.sh) ---------------------- `svn`工作目录从分支(`branches`)切换到主干(`trunk`)。 @@ -59,7 +59,7 @@ svn work dir /path/to/svn/work/dir1 switch from http://www.foo.com/project1/bran svn work dir /path/to/svn/work/dir2 switch from http://www.foo.com/project2/branches/feature1 to http://www.foo.com/project2/trunk ! ``` -🍺 [svn-merge-stop-on-copy.sh](../svn-merge-stop-on-copy.sh) +🍺 [svn-merge-stop-on-copy.sh](../legacy-bin/svn-merge-stop-on-copy.sh) ---------------------- 把指定的远程分支从刚新建分支以来的修改合并到本地`svn`目录或是另一个远程分支。 @@ -85,7 +85,7 @@ svn-merge-stop-on-copy.sh http://www.foo.com/project1/branches/feature1 http://w [姜太公](https://github.com/jzwlqx)提供此脚本。 -🍺 [cp-svn-url.sh](../cp-svn-url.sh) +🍺 [cp-svn-url.sh](../legacy-bin/cp-svn-url.sh) ---------------------- 拷贝当前`svn`目录对应的远程分支到系统的粘贴板,省去`CTRL+C`操作。 diff --git a/echo-args.sh b/echo-args.sh deleted file mode 120000 index 32c33811..00000000 --- a/echo-args.sh +++ /dev/null @@ -1 +0,0 @@ -echo-args \ No newline at end of file diff --git a/find-in-jars.sh b/find-in-jars.sh deleted file mode 120000 index cd6c3a87..00000000 --- a/find-in-jars.sh +++ /dev/null @@ -1 +0,0 @@ -find-in-jars \ No newline at end of file diff --git a/cp-svn-url.sh b/legacy-bin/cp-svn-url.sh similarity index 91% rename from cp-svn-url.sh rename to legacy-bin/cp-svn-url.sh index c8af85ed..baf8c9f4 100755 --- a/cp-svn-url.sh +++ b/legacy-bin/cp-svn-url.sh @@ -6,7 +6,7 @@ # $ ./cp-svn-url.sh # $ ./cp-svn-url.sh /path/to/svn/work/dir # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/vcs.md#-cp-svn-urlsh +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/vcs.md#-cp-svn-urlsh # @author ivanzhangwb (ivanzhangwb at gmail dot com) readonly PROG=`basename $0` diff --git a/svn-merge-stop-on-copy.sh b/legacy-bin/svn-merge-stop-on-copy.sh similarity index 95% rename from svn-merge-stop-on-copy.sh rename to legacy-bin/svn-merge-stop-on-copy.sh index 4a50bf90..69a4f87d 100755 --- a/svn-merge-stop-on-copy.sh +++ b/legacy-bin/svn-merge-stop-on-copy.sh @@ -7,7 +7,7 @@ # $ ./svnmerge.sh [target branch] # if no target branch, merge to current svn direcotry # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/vcs.md#-svn-merge-stop-on-copysh +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/vcs.md#-svn-merge-stop-on-copysh # @author jiangjizhong(@jzwlqx) # @author Jerry Lee (oldratlee at gmail dot com) diff --git a/swtrunk.sh b/legacy-bin/swtrunk.sh similarity index 91% rename from swtrunk.sh rename to legacy-bin/swtrunk.sh index e16f97ed..dceed78b 100755 --- a/swtrunk.sh +++ b/legacy-bin/swtrunk.sh @@ -5,7 +5,7 @@ # @Usage # $ ./swtrunk.sh [...] # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/vcs.md#-swtrunksh +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/vcs.md#-swtrunksh # @author Jerry Lee (oldratlee at gmail dot com) # NOTE: $'foo' is the escape sequence syntax of bash diff --git a/console-text-color-themes.sh b/lib/console-text-color-themes.sh similarity index 94% rename from console-text-color-themes.sh rename to lib/console-text-color-themes.sh index 7f939e74..d95dceac 100755 --- a/console-text-color-themes.sh +++ b/lib/console-text-color-themes.sh @@ -2,7 +2,7 @@ # @Function # show all console text color themes. # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/shell.md#-console-text-color-themessh +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-console-text-color-themessh # @author Jerry Lee (oldratlee at gmail dot com) readonly _ctct_PROG="$(basename "$(readlink -f "$0")")" diff --git a/parseOpts.sh b/lib/parseOpts.sh similarity index 99% rename from parseOpts.sh rename to lib/parseOpts.sh index eb6270aa..6d67f736 100755 --- a/parseOpts.sh +++ b/lib/parseOpts.sh @@ -15,7 +15,7 @@ # _OPT_VALUE_c_long = (c.sh -p pv -q qv arg1) # Array type # _OPT_ARGS = (aa bb cc) # Array type # -# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/shell.md#-parseoptssh +# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-parseoptssh # @author Jerry Lee (oldratlee at gmail dot com) ##################################################################### diff --git a/show-busy-java-threads.sh b/show-busy-java-threads.sh deleted file mode 120000 index 2c3d2d79..00000000 --- a/show-busy-java-threads.sh +++ /dev/null @@ -1 +0,0 @@ -show-busy-java-threads \ No newline at end of file diff --git a/tcp-connection-state-counter.sh b/tcp-connection-state-counter.sh deleted file mode 120000 index 60b5928f..00000000 --- a/tcp-connection-state-counter.sh +++ /dev/null @@ -1 +0,0 @@ -tcp-connection-state-counter \ No newline at end of file diff --git a/test-cases/parseOpts-test.sh b/test-cases/parseOpts-test.sh index 95271746..d87943d3 100755 --- a/test-cases/parseOpts-test.sh +++ b/test-cases/parseOpts-test.sh @@ -2,7 +2,7 @@ BASE=`dirname $0` -. $BASE/../parseOpts.sh +. $BASE/../lib/parseOpts.sh ################################################# diff --git a/test-cases/self-installer.sh b/test-cases/self-installer.sh index e816a93a..8b1a25fe 100644 --- a/test-cases/self-installer.sh +++ b/test-cases/self-installer.sh @@ -2,7 +2,7 @@ if which svn &> /dev/null; then [ ! -d "/tmp/useful-scripts-$USER" ] && - svn checkout https://github.com/oldratlee/useful-scripts/trunk "/tmp/useful-scripts-$USER" + svn checkout https://github.com/oldratlee/useful-scripts/branches/release-2.x "/tmp/useful-scripts-$USER" fi -export PATH="$PATH:/tmp/useful-scripts-$USER" +export PATH="$PATH:/tmp/useful-scripts-$USER/bin"