aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rwxr-xr-xcmake/install.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/install.sh b/cmake/install.sh
index 03eae77..7786adb 100755
--- a/cmake/install.sh
+++ b/cmake/install.sh
@@ -2,6 +2,8 @@
set -e
+[ $(id -u) -ne 0 ] && echo "You need root privileges to run the install script" && exit 1
+
case "$(uname -s)" in
Linux*) machine="Linux" ;;
Darwin*) machine="Mac" ;;
@@ -21,6 +23,6 @@ case $machine in
OpenBSD) bin_dir="/usr/local/bin" ;;
esac
-sudo cp sibs "$bin_dir"
+install -Dm755 sibs "$bin_dir/sibs"
echo "Copied $scriptpath/build/release/sibs to $bin_dir/sibs"
echo "Installation successful!"