mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-12 08:21:40 +00:00
~脚本进行大量拆分和优化
This commit is contained in:
8
scripts/libs/set_profile.sh
Normal file
8
scripts/libs/set_profile.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
set_profile() {
|
||||
[ -z "$my_alias" ] && my_alias=crash
|
||||
sed -i "/ShellCrash\/menu.sh/"d "$1"
|
||||
echo "alias ${my_alias}=\"$shtype $CRASHDIR/menu.sh\"" >>"$1" #设置快捷命令环境变量
|
||||
sed -i '/export CRASHDIR=*/'d "$1"
|
||||
echo "export CRASHDIR=\"$CRASHDIR\"" >>"$1" #设置路径环境变量
|
||||
}
|
||||
Reference in New Issue
Block a user