dotfiles

<-- duh.
Log | Files | Refs | LICENSE

commit b1db0ac3a1d281ce0c6848a124418ec1dd19131a
parent 561e23766aadbc7fb01296e4a47d4f88da288c37
Author: hhvn <dev@haydenvh.com>
Date:   Tue,  2 Mar 2021 13:00:34 +0000

.scripts/bin/netimg: support multiple URIs

Diffstat:
M.scripts/bin/netimg | 20++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/.scripts/bin/netimg b/.scripts/bin/netimg @@ -1,6 +1,18 @@ #!/bin/sh -t=$(mktemp) -curl -L "$1" > $t -sxiv $t -rm $t +while [ $# != 0 ] +do + + file="/tmp/netimg.$(head -n 5 /dev/urandom | base64 | tr '/' '+' | tr -d '\n' | cut -c-10)" + while [ -f $file ] + do + file="/tmp/netimg.$(head -n 5 /dev/urandom | base64 | tr '/' '+' | tr -d '\n' | cut -c-10)" + done + + curl -L "$1" > "$file" + files="$files $file" + shift +done + +sxiv $files +rm $files