Textadept: Package manager reads from a list of URI and updates/clones

master
Pierre Neidhardt 2014-11-04 17:29:52 +01:00
parent 674b835446
commit e9cc0b4d9d
2 changed files with 22 additions and 1 deletions

View File

@ -1,2 +1,22 @@
#!/bin/sh
git clone https://github.com/rgieseke/textredux.git
source="$HOME/.textadept/modules/repos"
root="$HOME/.textadept/modules/"
cd "$root"
while IFS= read -r i; do
basename=${i##*/}
vcs=${basename##*.}
basename=${basename%.*}
if [ -n "$vcs" ]; then
if [ -d "$basename/.$vcs" ]; then
cd "$basename"
"$vcs" pull
elif [ ! -d "$basename" ]; then
"$vcs" clone "$i"
else
echo "Warning: Module $basename is present and not under version control" >&2
fi
else
echo "Error: URI $i lacks VCS extension" >&2
fi
done <"$source"

1
.textadept/modules/repos Normal file
View File

@ -0,0 +1 @@
https://github.com/rgieseke/textredux.git