From 4e87231b59e4f3cae7e941f761f3c6a9a16f90ed Mon Sep 17 00:00:00 2001 From: Serge Guzik Date: Fri, 15 Feb 2019 11:32:49 +0200 Subject: [PATCH] chore: Use 'install' instead of 'cp, chmod, mv,...' --- install | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/install b/install index c401d14..b97801a 100755 --- a/install +++ b/install @@ -59,11 +59,12 @@ function install() { echo "Error: Failed to download $name" >&2 fail fi - echo "Installing $LOCATION/$name..." - chmod 755 "$temp_location" && \ - sudo chown root:root "$temp_location" && \ - sudo mkdir -p "$LOCATION" && \ - sudo mv "$temp_location" "$LOCATION/$name" + echo "Creating $LOCATION/$name..." + sudo install -D \ + --mode=755 \ + --owner=root \ + --group=root \ + "$temp_location" "$LOCATION" if [[ $? != 0 ]]; then echo "Error: Failed to install $name" >&2 fail