aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rwxr-xr-xcmake/install.sh4
-rw-r--r--src/main.cpp1
3 files changed, 5 insertions, 2 deletions
diff --git a/README.md b/README.md
index 561d17a..e128b25 100644
--- a/README.md
+++ b/README.md
@@ -61,7 +61,7 @@ Linux is the primary platform, the platform which master branch is guaranteed to
# Installation
## Posix (Linux, MacOS, OpenBSD, Haiku)
-`./cmake/install.sh`
+Run `./cmake/install.sh` as root user.
## Arch Linux
On Arch Linux, sibs can alternatively be found on aur under the name `sibs-git` (`yay -S sibs-git`).
## Windows
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!"
diff --git a/src/main.cpp b/src/main.cpp
index 4690668..713514d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1485,6 +1485,7 @@ int main(int argc, const _tinydir_char_t **argv)
int wmain(int argc, const _tinydir_char_t **argv)
#endif
{
+ setlocale(LC_ALL, "C"); // Sigh... stupid C
unordered_map<string, string> param;
unordered_set<string> flags;