katana/fetch.sh

23 lines
387 B
Bash
Raw Normal View History

2014-12-04 17:40:17 +00:00
#!/bin/bash
set -e
cwd="$(pwd)"
if ! type -p git ;then
echo "Git is not installed"
exit 1
fi
2014-12-04 17:40:17 +00:00
for p in "${packs[@]}";do
2014-12-04 19:55:35 +00:00
if [ -d "$p/.git" ];then
2014-12-04 17:40:17 +00:00
echo "Updating sources of $p..."
cd "$cwd/$p"
git pull
cd "$cwd"
else
echo "Fetching sources of $p..."
git clone --depth=1 "git://git.osdn.net/gitroot/kde/$p.git"
2014-12-04 17:40:17 +00:00
fi
done