Add remote sourcing
This commit is contained in:
parent
59f56831ee
commit
59c323b383
2 changed files with 15 additions and 3 deletions
11
.bin/source-remote-file
Executable file
11
.bin/source-remote-file
Executable file
|
@ -0,0 +1,11 @@
|
|||
base_path="$HOME/.cache/remote-sources"
|
||||
mkdir -p "$base_path"
|
||||
file_path="$base_path/$1"
|
||||
if [ ! -f "$file_path" ]
|
||||
then
|
||||
echo "Installing file $1"
|
||||
curl -Ls -o "$file_path" "$2"
|
||||
fi
|
||||
source $file_path
|
||||
|
||||
# vim: ft=bash
|
Loading…
Add table
Add a link
Reference in a new issue