@jswork/ushell-module-base 1.0.65 → 1.0.67
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 +1 -0
- package/modules/01-edit.sh +1 -0
- package/modules/02-direnv.sh +3 -0
- package/modules/_ins.sh +4 -0
- package/package.json +1 -1
package/index.sh
CHANGED
|
@@ -10,6 +10,7 @@ PS1="\[[\e[1;32m\]\u\[\e[m\]\[\e[1;36m\]@\[\e[m\]\[\e[1;35m\]\h\[\e[m\]:\w]\n\$
|
|
|
10
10
|
## base:
|
|
11
11
|
|
|
12
12
|
source $ROOT_PATH/modules/01-edit.sh
|
|
13
|
+
source $ROOT_PATH/modules/02-direnv.sh
|
|
13
14
|
source $ROOT_PATH/modules/_ins.sh
|
|
14
15
|
source $ROOT_PATH/modules/_mkp.sh
|
|
15
16
|
source $ROOT_PATH/modules/cd.sh
|
package/modules/01-edit.sh
CHANGED
package/modules/_ins.sh
CHANGED
|
@@ -4,9 +4,13 @@ function ins() {
|
|
|
4
4
|
if [ $# -eq 1 ]; then
|
|
5
5
|
# 只有一个参数,保持现有逻辑
|
|
6
6
|
cp "$1" /usr/local/bin/
|
|
7
|
+
# 给权限
|
|
8
|
+
chmod +x "/usr/local/bin/$1"
|
|
7
9
|
elif [ $# -eq 2 ]; then
|
|
8
10
|
# 如果有两个参数,将 $1 复制到 /usr/local/bin/$2
|
|
9
11
|
cp "$1" "/usr/local/bin/$2"
|
|
12
|
+
# 给权限
|
|
13
|
+
chmod +x "/usr/local/bin/$2"
|
|
10
14
|
else
|
|
11
15
|
# 参数错误提示
|
|
12
16
|
echo "Usage: ins <source> [destination]"
|