error fixes
This commit is contained in:
parent
fc6025d0ae
commit
951ed75144
1 changed files with 11 additions and 2 deletions
|
@ -53,13 +53,14 @@ fi
|
|||
clone() {
|
||||
local cloneDir="/opt/shell-color-scripts"
|
||||
if [ ! -d "$cloneDir" ]; then
|
||||
$_sudo git clone --depth=1 https://github.com/charitarthchugh/shell-color-scripts "$cloneDir"
|
||||
$_sudo git clone --depth=1 https://github.com/charitarthchugh/shell-color-scripts "$cloneDir" &&
|
||||
$_sudo chmod +x "$cloneDir/colorscript.sh"
|
||||
fi
|
||||
}
|
||||
|
||||
link() {
|
||||
if [ -d "$HOME/.local/bin" ]; then
|
||||
ln -sfr /opt/shell-color-scripts/colorscript.sh "$HOME/.local/bin/colorscript"
|
||||
$_sudo ln -sfr /opt/shell-color-scripts/colorscript.sh "$HOME/.local/bin/colorscript" || echo_error "Could not link the script"
|
||||
else
|
||||
if check_root; then
|
||||
$_sudo ln -sfr /opt/shell-color-scripts/colorscript.sh /bin/colorscript
|
||||
|
@ -69,7 +70,15 @@ link() {
|
|||
fi
|
||||
}
|
||||
|
||||
checkInstall() {
|
||||
if command_exists colorscript; then
|
||||
echo_note "Installation complete"
|
||||
fi
|
||||
}
|
||||
|
||||
check_root &&
|
||||
if clone; then
|
||||
link
|
||||
fi
|
||||
|
||||
checkInstall
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue