summaryrefslogtreecommitdiff
path: root/install_wget
blob: 4800e8d2929bd1d5296a1abd91edb68c924dc9b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash

find . -type f -name "*.wget" | \
    while read -r file; do
        destination=$HOME/$(echo "${file%.*}" | sed 's#\./[^/]*/##')
        mkdir -p "$(dirname "$destination")"
        wget "$(cat  "$file")" -O "$destination"
        if [[ "$file" == ./bin/* ]]; then
            chmod +x "$destination"
        fi
    done && echo "Installation successful"