mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 05:12:27 +00:00
Implement dir checking logic
This commit is contained in:
parent
8ed2265463
commit
55c6db1b12
|
@ -5,6 +5,10 @@
|
|||
gitpath="$HOME/.local/share/mybash"
|
||||
|
||||
cloneMyBash() {
|
||||
# Check if the dir exists before attempting to clone into it.
|
||||
if [ -d "$gitpath" ]; then
|
||||
rm -rf "$gitpath"
|
||||
fi
|
||||
mkdir -p "$HOME/.local/share" # Only create the dir if it doesn't exist.
|
||||
cd "$HOME" && git clone https://github.com/ChrisTitusTech/mybash.git "$gitpath"
|
||||
}
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
gitpath="$HOME/.local/share/neovim"
|
||||
|
||||
cloneNeovim() {
|
||||
# Check if the dir exists before attempting to clone into it.
|
||||
if [ -d "$gitpath" ]; then
|
||||
rm -rf "$gitpath"
|
||||
fi
|
||||
mkdir -p "$HOME/.local/share" # Only create the dir if it doesn't exist.
|
||||
cd "$HOME" && git clone https://github.com/ChrisTitusTech/neovim.git "$HOME/.local/share/neovim"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user