From 5239458a0ed44c9ecf503bc54a3cab799531326e Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sat, 17 Nov 2018 15:11:14 +0100 Subject: Add support for external files --- install_wget | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 install_wget (limited to 'install_wget') diff --git a/install_wget b/install_wget new file mode 100644 index 0000000..f21bfa7 --- /dev/null +++ b/install_wget @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +find . -type f -name "*.wget" | \ + while read -r file; do + destination=$HOME/$(echo "${file%.*}" | sed 's#\./[^/]*/##') + wget "$(cat "$file")" -O "$destination" + if [[ "$file" == ./bin/* ]]; then + chmod +x "$destination" + fi + done && echo "Installation successful" -- cgit v1.2.3