From 8f53d145fa193e4e5204e8949d3f7cd873e24b64 Mon Sep 17 00:00:00 2001 From: Horst3180 Date: Tue, 8 Dec 2015 18:26:34 +0100 Subject: [PATCH] remove bashisms --- arc-theme-upgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arc-theme-upgrade b/arc-theme-upgrade index ce475b0..5f27982 100755 --- a/arc-theme-upgrade +++ b/arc-theme-upgrade @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Script to upgrade/install the arc-theme @@ -29,11 +29,11 @@ userdarkdir2=$HOME/local/share/themes/Arc-Dark #Functions show_error() { -echo -e "\033[1;31m$@\033[0m" +printf "\033[1;31m$@\033[0m\n" } check_root() { - if [[ "${EUID}" -ne 0 ]]; then + if [ "$(id -u)" -ne 0 ]; then show_error "This script has to be run as root" echo exec sudo "$0" "$@" # Instead of exit, just re-execute as root