2022-10-17 16:49:58 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
2022-09-13 20:19:08 +00:00
|
|
|
base_path="$HOME/.cache/remote-sources"
|
2022-10-17 19:37:38 +00:00
|
|
|
file_path="$base_path/$2"
|
2022-10-27 13:55:18 +00:00
|
|
|
|
|
|
|
autoinstall file "$1" "$file_path"
|
|
|
|
mkdir -p "$base_path"
|
2022-09-13 20:19:08 +00:00
|
|
|
if [ ! -f "$file_path" ]
|
|
|
|
then
|
2022-10-17 19:37:38 +00:00
|
|
|
echo "Installing file $2"
|
2022-11-13 22:22:21 +00:00
|
|
|
curl -fsSL -o "$file_path" "$1"
|
2022-09-13 20:19:08 +00:00
|
|
|
fi
|
2022-10-17 19:37:38 +00:00
|
|
|
|
|
|
|
# shellcheck disable=SC1090
|
|
|
|
. "$file_path"
|