Skip to content

Instantly share code, notes, and snippets.

@gulafaran
Forked from anonymous/epicabs
Last active August 29, 2015 14:10
Show Gist options
  • Save gulafaran/d82984e8021d5def1372 to your computer and use it in GitHub Desktop.
Save gulafaran/d82984e8021d5def1372 to your computer and use it in GitHub Desktop.
#!/bin/bash
epicabs() {
package="$@"
fullpath="$(pwd)/$package"
if [ -d "$fullpath" ] ; then
cd "$fullpath"
git pull
cd ..
else
echo "Cloning from packages.git"
git clone -b packages/"$package" --single-branch git://projects.archlinux.org/svntogit/packages.git "$package"
if [ $? -eq 128 ] ; then
echo "Cloning from community.git"
git clone -b packages/"$package" --single-branch git://projects.archlinux.org/svntogit/community.git "$package"
fi
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment