diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2c4b2298..205dc9a0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,7 +24,7 @@ jobs: # https://docs.github.com/en/actions/learn-github-actions/variables#detecting-the-operating-system # https://docs.github.com/en/actions/learn-github-actions/expressions if: runner.os == 'macOS' - - run: test-cases/integration-test.sh + - run: test/integration-test.sh # https://remarkablemark.org/blog/2017/10/12/check-git-dirty/ - name: Check git dirty run: | diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 26788dce..a353427a 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - run: test-cases/lint.sh + - run: test/lint.sh # https://remarkablemark.org/blog/2017/10/12/check-git-dirty/ - name: Check git dirty run: | diff --git a/.gitmodules b/.gitmodules index 94904715..6923012c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "test-cases/shunit2"] - path = test-cases/shunit2-lib +[submodule "test/shunit2"] + path = test/shunit2-lib url = https://github.com/kward/shunit2.git diff --git a/README.md b/README.md index 32a6764d..50c0bbd4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ #
-
+
@@ -52,7 +52,7 @@
----------------------
```bash
-source <(curl -fsSL https://raw.githubusercontent.com/oldratlee/useful-scripts/release-2.x/test-cases/self-installer.sh)
+source <(curl -fsSL https://raw.githubusercontent.com/oldratlee/useful-scripts/release-3.x/test/self-installer.sh)
```
更多下载&使用方式,参见[下载使用](docs/install.md)。
diff --git a/bin/a2l b/bin/a2l
index 9752fdbd..ea1588b8 100755
--- a/bin/a2l
+++ b/bin/a2l
@@ -6,7 +6,7 @@
# $ ./a2l arg1 arg2
# $ ./a2l *.txt
#
-# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-a2l
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.x/docs/shell.md#-a2l
# @author Jerry Lee (oldratlee at gmail dot com)
set -eEuo pipefail
diff --git a/bin/ap b/bin/ap
index b4790e19..82c30185 100755
--- a/bin/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/dev-2.x/docs/shell.md#-ap-and-rp
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.x/docs/shell.md#-ap-and-rp
# @author Jerry Lee (oldratlee at gmail dot com)
set -eEuo pipefail
diff --git a/bin/c b/bin/c
index fd426e11..b2c1dd15 100755
--- a/bin/c
+++ b/bin/c
@@ -7,7 +7,7 @@
# $ ls -l | c
# $ c -q < ~/.ssh/id_rsa.pub
#
-# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-c
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.x/docs/shell.md#-c
# @author Jerry Lee (oldratlee at gmail dot com)
set -eEuo pipefail
diff --git a/bin/coat b/bin/coat
index 7eb2ba7b..dbdb4f4a 100755
--- a/bin/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/dev-2.x/docs/shell.md#-coat
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.x/docs/shell.md#-coat
# @author Jerry Lee (oldratlee at gmail dot com)
set -eEuo pipefail
diff --git a/bin/cp-into-docker-run b/bin/cp-into-docker-run
index 048ff428..6d008c03 100755
--- a/bin/cp-into-docker-run
+++ b/bin/cp-into-docker-run
@@ -5,7 +5,7 @@
# Example:
# cp-into-docker-run -c container_foo command_copied_into_container command_arg1
#
-# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-cp-into-docker-run
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.x/docs/shell.md#-cp-into-docker-run
# @author Jerry Lee (oldratlee at gmail dot com)
set -eEuo pipefail
diff --git a/bin/echo-args b/bin/echo-args
index 9186a6e3..ca2ea749 100755
--- a/bin/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/dev-2.x/docs/shell.md#-echo-args
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.x/docs/shell.md#-echo-args
# @author Jerry Lee (oldratlee at gmail dot com)
set -eEuo pipefail
diff --git a/bin/find-in-jars b/bin/find-in-jars
index 7a9d0081..f49e9ec1 100755
--- a/bin/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/dev-2.x/docs/java.md#-find-in-jars
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.x/docs/java.md#-find-in-jars
# @author Jerry Lee (oldratlee at gmail dot com)
set -eEuo pipefail
diff --git a/bin/rp b/bin/rp
index 942810ad..701c8756 100755
--- a/bin/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/dev-2.x/docs/shell.md#-ap-and-rp
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.x/docs/shell.md#-ap-and-rp
# @author Jerry Lee (oldratlee at gmail dot com)
set -eEuo pipefail
diff --git a/bin/show-busy-java-threads b/bin/show-busy-java-threads
index 4fa7fe01..717506ca 100755
--- a/bin/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/dev-2.x/docs/java.md#-show-busy-java-threads
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.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/bin/show-duplicate-java-classes b/bin/show-duplicate-java-classes
index e1b7b226..5da1f73c 100755
--- a/bin/show-duplicate-java-classes
+++ b/bin/show-duplicate-java-classes
@@ -11,7 +11,7 @@
# $ show-duplicate-java-classes -L path/to/lib_dir1 # search jars in the subdirectories of lib dir
# $ show-duplicate-java-classes -J path/to/lib_dir1 # search jars in the jar file
#
-# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/java.md#-show-duplicate-java-classes
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.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/bin/taoc b/bin/taoc
index 3ba8614a..461c5ba5 100755
--- a/bin/taoc
+++ b/bin/taoc
@@ -7,7 +7,7 @@
# $ taoc /path/to/file1
# $ taoc /path/to/file1 /path/to/file2
#
-# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-coat
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.x/docs/shell.md#-coat
# @author Jerry Lee (oldratlee at gmail dot com)
set -eEuo pipefail
diff --git a/bin/tcp-connection-state-counter b/bin/tcp-connection-state-counter
index ce060fae..244bd639 100755
--- a/bin/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/dev-2.x/docs/shell.md#-tcp-connection-state-counter
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.x/docs/shell.md#-tcp-connection-state-counter
# @author Jerry Lee (oldratlee at gmail dot com)
# @author @sunuslee (sunuslee at gmail dot com)
set -eEuo pipefail
diff --git a/bin/uq b/bin/uq
index 16da32e0..581bfb7c 100755
--- a/bin/uq
+++ b/bin/uq
@@ -7,7 +7,7 @@
# @Usage
# uq [OPTION]... [INPUT [OUTPUT]]
#
-# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-uq
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.x/docs/shell.md#-uq
# @author Zava Xu (zava.kid at gmail dot com)
# @author Jerry Lee (oldratlee at gmail dot com)
set -eEuo pipefail
diff --git a/bin/xpf b/bin/xpf
index 34af6d91..8643c134 100755
--- a/bin/xpf
+++ b/bin/xpf
@@ -6,7 +6,7 @@
# @Usage
# $ ./xpf file
#
-# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-xpl-and-xpf
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.x/docs/shell.md#-xpl-and-xpf
# @author Jerry Lee (oldratlee at gmail dot com)
set -eEuo pipefail
diff --git a/bin/xpl b/bin/xpl
index 7aa0127d..d9066f82 100755
--- a/bin/xpl
+++ b/bin/xpl
@@ -5,7 +5,7 @@
# @Usage
# $ ./xpf [file [file ...] ]
#
-# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-xpl-and-xpf
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.x/docs/shell.md#-xpl-and-xpf
# @author Jerry Lee (oldratlee at gmail dot com)
set -eEuo pipefail
diff --git a/docs/install.md b/docs/install.md
index 5ef3b633..26f9ca29 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-2.x
+git checkout release-3.x
# 更新脚本
git pull
@@ -22,13 +22,13 @@ git pull
包含2个分支:
-- `dev-2.x`:开发分支
-- `release-2.x`:发布分支,功能稳定的脚本
+- `dev-3.x`:开发分支
+- `release-3.x`:发布分支,功能稳定的脚本
当然如果你不想安装`git`,`github`是支持`svn`的:
```bash
-svn co https://github.com/oldratlee/useful-scripts/branches/release-2.x
+svn co https://github.com/oldratlee/useful-scripts/branches/release-3.x
cd useful-scripts
@@ -41,29 +41,29 @@ PS:
### 打包下载
-下载文件[release-2.x.zip](https://github.com/oldratlee/useful-scripts/archive/release-2.x.zip):
+下载文件[release-3.x.zip](https://github.com/oldratlee/useful-scripts/archive/release-3.x.zip):
```bash
-wget --no-check-certificate https://github.com/oldratlee/useful-scripts/archive/release-2.x.zip
+wget --no-check-certificate https://github.com/oldratlee/useful-scripts/archive/release-3.x.zip
-unzip release-2.x.zip
+unzip release-3.x.zip
```
下载和运行单个文件
-------------------
-以[`show-busy-java-threads`](https://raw.github.com/oldratlee/useful-scripts/release-2.x/bin/show-busy-java-threads)为例。
+以[`show-busy-java-threads`](https://raw.github.com/oldratlee/useful-scripts/release-3.x/bin/show-busy-java-threads)为例。
### `curl`文件直接用`bash`运行
```bash
-curl -sLk 'https://raw.github.com/oldratlee/useful-scripts/release-2.x/bin/show-busy-java-threads' | bash
+curl -sLk 'https://raw.github.com/oldratlee/useful-scripts/release-3.x/bin/show-busy-java-threads' | bash
```
### 下载单个文件
```bash
-wget --no-check-certificate https://raw.github.com/oldratlee/useful-scripts/release-2.x/bin/show-busy-java-threads
+wget --no-check-certificate https://raw.github.com/oldratlee/useful-scripts/release-3.x/bin/show-busy-java-threads
chmod +x show-busy-java-threads
./show-busy-java-threads
diff --git a/docs/shell.md b/docs/shell.md
index 4ff27aac..6d8b0e39 100644
--- a/docs/shell.md
+++ b/docs/shell.md
@@ -198,8 +198,8 @@ B.java
# 把参数按行输出方便查看 或是 grep
$ a2l **/*.sh
lib/console-text-color-themes.sh
-test-cases/parseOpts_test.sh
-test-cases/self-installer.sh
+test/parseOpts_test.sh
+test/self-installer.sh
...
```
diff --git a/legacy-bin/cp-svn-url b/legacy-bin/cp-svn-url
index f716d6fc..80d122ca 100755
--- a/legacy-bin/cp-svn-url
+++ b/legacy-bin/cp-svn-url
@@ -6,7 +6,7 @@
# $ ./cp-svn-url
# $ ./cp-svn-url /path/to/svn/work/dir
#
-# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/vcs.md#-cp-svn-url
+# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-3.x/docs/vcs.md#-cp-svn-url
# @author ivanzhangwb (ivanzhangwb at gmail dot com)
readonly PROG=${0##*/}
diff --git a/legacy-bin/svn-merge-stop-on-copy b/legacy-bin/svn-merge-stop-on-copy
index 249fa7d2..efc3d8ad 100755
--- a/legacy-bin/svn-merge-stop-on-copy
+++ b/legacy-bin/svn-merge-stop-on-copy
@@ -7,7 +7,7 @@
# $ ./svnmerge.sh