Skip to content

Commit

Permalink
Unified install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
somepaulo committed Oct 6, 2023
1 parent 3e19b57 commit 05650c0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ This theme is built and tested against vanilla Gnome on Arch Linux. If an icon i
`cd Morewaita`

##### Install system-wide (recommended)
`./system-install.sh`
`sudo ./install.sh`
This copies the whole theme folder without the build files into `/usr/share/icons/`. You will be prompted for your password.

##### Install for local user
`./local-install.sh`
`./install.sh`
This copies the whole theme folder without the build files into `~/.local/share/icons/`.

##### Update
Expand Down
20 changes: 20 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

is_user_root ()
{
[ "$(id -u)" -eq 0 ]
}

if is_user_root; then
THEMEDIR=/usr/share/icons/MoreWaita/
else
THEMEDIR=$HOME/.local/share/icons/MoreWaita/
fi

mkdir -p $THEMEDIR
shopt -s extglob
cp -avu "$(pwd -P)"/!(*.build|*.sh|*.py|*.md|.git|.github|.gitignore|_dev) $THEMEDIR
shopt -u extglob
find $THEMEDIR -name '*.build' -type f -delete
gtk-update-icon-cache -f -t $THEMEDIR && xdg-desktop-menu forceupdate

0 comments on commit 05650c0

Please sign in to comment.