From a298620e9d3b587dd20e3bc1d5e62eb1764a0459 Mon Sep 17 00:00:00 2001 From: b1ue Date: Tue, 5 Mar 2019 16:26:10 +0100 Subject: [PATCH 1/4] Added Arch linux option in the dependencies script --- tools/get_dependencies.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/get_dependencies.sh b/tools/get_dependencies.sh index f2a36e2..1414d9f 100755 --- a/tools/get_dependencies.sh +++ b/tools/get_dependencies.sh @@ -44,6 +44,11 @@ get_debian_deps() libssl-dev bash patch make tar xz-utils bzip2 gzip sed cpio libbz2-dev } +get_arch_deps() +{ + pacman -S clang llvm libxml2 openssl bash patch make tar bzip2 gzip sed cpio xz +} + unknown() { echo "Unknown system type. Please get dependencies by hand " @@ -67,6 +72,8 @@ if [ -e /etc/issue ]; then get_fedora_deps elif [ "`grep -i mageia /etc/issue`" ]; then get_mageia_deps + elif [ "`grep -i arch /etc/issue`" ]; then + get_arch_deps else unknown fi From 05b2486a0cf31a79ea14329dfb83b6107b040b9a Mon Sep 17 00:00:00 2001 From: b1ue Date: Thu, 7 Mar 2019 11:37:23 +0100 Subject: [PATCH 2/4] Added feature to install uuid from AUR --- tools/get_dependencies.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/get_dependencies.sh b/tools/get_dependencies.sh index 1414d9f..180ad06 100755 --- a/tools/get_dependencies.sh +++ b/tools/get_dependencies.sh @@ -4,6 +4,8 @@ # this assumes you are running as root or are using sudo # +USER="$(cat /etc/passwd | grep '/home' | cut -d: -f1 | head -1)" + get_fedora_deps() { yum install clang llvm-devel libxml2-devel libuuid-devel openssl-devel \ @@ -73,7 +75,10 @@ if [ -e /etc/issue ]; then elif [ "`grep -i mageia /etc/issue`" ]; then get_mageia_deps elif [ "`grep -i arch /etc/issue`" ]; then + echo "Running pacman to install dependencies..." get_arch_deps + echo "Downloading and Installing uuid..." + sudo -u $USER -- sh -c 'git clone https://aur.archlinux.org/uuid.git /tmp/uuid; pushd /tmp/uuid; makepkg -srci; popd; rm -rf /tmp/uuid' else unknown fi From a1c48a02d48eafd43b4a359e840b2df67e6719bc Mon Sep 17 00:00:00 2001 From: b1ue Date: Thu, 7 Mar 2019 12:38:41 +0100 Subject: [PATCH 3/4] Update: it is better to use env to handle the case the host system has multiple users --- tools/get_dependencies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/get_dependencies.sh b/tools/get_dependencies.sh index 180ad06..eaeb329 100755 --- a/tools/get_dependencies.sh +++ b/tools/get_dependencies.sh @@ -4,7 +4,7 @@ # this assumes you are running as root or are using sudo # -USER="$(cat /etc/passwd | grep '/home' | cut -d: -f1 | head -1)" +USER="$(env | grep 'USER' | cut -d '=' -f2 | head -1)" get_fedora_deps() { From bea1afb2f3b87ff036f1321734ab73f076883413 Mon Sep 17 00:00:00 2001 From: b1ue Date: Thu, 7 Mar 2019 14:25:15 +0100 Subject: [PATCH 4/4] Fix the findtherightuser problem --- tools/get_dependencies.sh | 2 +- tools/x | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 tools/x diff --git a/tools/get_dependencies.sh b/tools/get_dependencies.sh index eaeb329..c9ad61a 100755 --- a/tools/get_dependencies.sh +++ b/tools/get_dependencies.sh @@ -4,7 +4,7 @@ # this assumes you are running as root or are using sudo # -USER="$(env | grep 'USER' | cut -d '=' -f2 | head -1)" +USER="$(stat --format=%U .)" get_fedora_deps() { diff --git a/tools/x b/tools/x new file mode 100644 index 0000000..e69de29