install.sh: Use install -d instead of mkdir

Instead of checking for the existence of a directory, and repeating the
same code in both branches (with an mkdir added in the else branch), use
install -d to create the directory if it does not exist.

This simplifies the code a little, by removing a bit of repetition.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This commit is contained in:
Gergely Nagy
2015-12-22 13:15:35 +01:00
parent ca720c6627
commit f6462b3c70

View File

@@ -90,12 +90,8 @@ elif [ "$UID" -ne "$ROOT_UID" ]; then
fi
echo "Installing..."
# .local/share/icons
if [ -d $HOME/.local/share/icons ]; then
cp -RH ./Paper/ $HOME/.local/share/icons/
else
mkdir -p $HOME/.local/share/icons
cp -RH ./Paper/ $HOME/.local/share/icons/
fi
install -d $HOME/.local/share/icons
cp -RH ./Paper/ $HOME/.local/share/icons/
show_success "Installation complete!"
echo
useicons