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"
|
|
|
|
mkdir -p "$base_path"
|
2022-10-17 19:37:38 +00:00
|
|
|
file_path="$base_path/$2"
|
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"
|
|
|
|
curl -Ls -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"
|