@jswork/ushell-module-base 1.0.58 → 1.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.sh +0 -1
- package/modules/_ins.sh +11 -1
- package/package.json +1 -1
- package/modules/tldr.sh +0 -4
package/index.sh
CHANGED
package/modules/_ins.sh
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
|
|
3
3
|
function ins() {
|
|
4
|
-
|
|
4
|
+
if [ $# -eq 1 ]; then
|
|
5
|
+
# 只有一个参数,保持现有逻辑
|
|
6
|
+
cp "$1" /usr/local/bin/
|
|
7
|
+
elif [ $# -eq 2 ]; then
|
|
8
|
+
# 如果有两个参数,将 $1 复制到 /usr/local/bin/$2
|
|
9
|
+
cp "$1" "/usr/local/bin/$2"
|
|
10
|
+
else
|
|
11
|
+
# 参数错误提示
|
|
12
|
+
echo "Usage: ins <source> [destination]"
|
|
13
|
+
return 1
|
|
14
|
+
fi
|
|
5
15
|
}
|
package/package.json
CHANGED
package/modules/tldr.sh
DELETED