.dotfiles/.bin/source-remote-file
2022-11-13 23:22:21 +01:00

16 lines
280 B
Bash
Executable file

#!/usr/bin/env sh
base_path="$HOME/.cache/remote-sources"
file_path="$base_path/$2"
autoinstall file "$1" "$file_path"
mkdir -p "$base_path"
if [ ! -f "$file_path" ]
then
echo "Installing file $2"
curl -fsSL -o "$file_path" "$1"
fi
# shellcheck disable=SC1090
. "$file_path"