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() {
|
clone() {
|
||||||
local cloneDir="/opt/shell-color-scripts"
|
local cloneDir="/opt/shell-color-scripts"
|
||||||
if [ ! -d "$cloneDir" ]; then
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
link() {
|
link() {
|
||||||
if [ -d "$HOME/.local/bin" ]; then
|
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
|
else
|
||||||
if check_root; then
|
if check_root; then
|
||||||
$_sudo ln -sfr /opt/shell-color-scripts/colorscript.sh /bin/colorscript
|
$_sudo ln -sfr /opt/shell-color-scripts/colorscript.sh /bin/colorscript
|
||||||
|
@ -69,7 +70,15 @@ link() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkInstall() {
|
||||||
|
if command_exists colorscript; then
|
||||||
|
echo_note "Installation complete"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
check_root &&
|
check_root &&
|
||||||
if clone; then
|
if clone; then
|
||||||
link
|
link
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
checkInstall
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue