summaryrefslogtreecommitdiff
path: root/install_wget
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2018-11-17 15:11:14 +0100
committerUrbain Vaes <urbain@vaes.uk>2018-11-17 15:11:14 +0100
commit5239458a0ed44c9ecf503bc54a3cab799531326e (patch)
tree8b523239571ddd636f62c5edb99d49f5c751f4ca /install_wget
parent93ec8a8832241455ed7d2e06b7a5b94d75148b39 (diff)
Add support for external files
Diffstat (limited to 'install_wget')
-rw-r--r--install_wget10
1 files changed, 10 insertions, 0 deletions
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"