File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 3
3
SCRIPT_DIR=$( realpath " ./" )
4
4
SHELL_CONFIG=" $HOME /.bashrc"
5
5
6
- # add support for .bashrc and if neither file exist
6
+ # TODO: add support for .bashrc and if neither file exist
7
7
if [ " $SHELL " == " /bin/zsh" ]; then
8
8
SHELL_CONFIG=" $HOME /.zshrc"
9
9
fi
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+
4
+ SCRIPT_DIR=$( realpath " ./" )
5
+ SHELL_CONFIG=" $HOME /.bashrc"
6
+
7
+ if [ " $SHELL " == " /bin/zsh" ]; then
8
+ SHELL_CONFIG=" $HOME /.zshrc"
9
+ fi
10
+
11
+ SCRIPT_PATH_CPL_JLC=" ./format_cpl_jlc.sh"
12
+ SCRIPT_NAME_CPL_JLC=$( basename " $SCRIPT_PATH_CPL_JLC " )
13
+
14
+ chmod -x " $SCRIPT_PATH_CPL_JLC "
15
+
16
+ # Remove the script's directory from PATH in the shell configuration
17
+ if grep -q " export PATH=\" $SCRIPT_DIR " " $SHELL_CONFIG " ; then
18
+ sed -i " \|export PATH=\" $SCRIPT_DIR |d" " $SHELL_CONFIG "
19
+ echo " Removed $SCRIPT_DIR from PATH in $SHELL_CONFIG ."
20
+ PATH=$( echo " $PATH " | sed -e " s|$SCRIPT_DIR :||" -e " s|:$SCRIPT_DIR ||" ) # Update current session
21
+ echo " Temporary PATH updated for this session."
22
+ else
23
+ echo " Directory $SCRIPT_DIR not found in $SHELL_CONFIG ."
24
+ fi
25
+
26
+ echo " Uninstallation complete."
You can’t perform that action at this time.
0 commit comments