From b97827f8ddfb10dccd466185c2220d2180ff9646 Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Sun, 26 Jan 2020 22:56:09 +0800 Subject: [PATCH] update --- README.md | 4 ++-- install.sh | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 install.sh diff --git a/README.md b/README.md index 4101f85..96a5a20 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ To install the cursor theme simply copy the compiled theme to your icons directory. For local user installation: ``` -cp -pr dist/ ~/.icons/McMojave-cursors +./install.sh ``` For system-wide installation for all users: ``` -sudo cp -pr dist/ /usr/share/icons/McMojave-cursors +sudo ./install.sh ``` Then set the theme with your preferred desktop tools. diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..9a496cc --- /dev/null +++ b/install.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +ROOT_UID=0 +DEST_DIR= + +# Destination directory +if [ "$UID" -eq "$ROOT_UID" ]; then + DEST_DIR="/usr/share/icons" +else + DEST_DIR="$HOME/.local/share/icons" +fi + +cp -pr dist/ $DEST_DIR/McMojave-cursors + +echo "Finished..." +