summaryrefslogtreecommitdiff
path: root/install_wget
blob: f21bfa73dc9ab0b6a36bc1d1a57f12b23c255981 (plain)
1
2
3
4
5
6
7
8
9
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"