-
-
Save ShadowKyogre/a38ac983350a76078309 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -z $@ ]]; then | |
echo 'packages list is missed' | |
echo 'run ./import-to-aur4.sh pack1 pack2 pack3' | |
exit | |
fi | |
mkdir aur4 | |
cd aur4 | |
for package in $@; do | |
prefix=$(echo $package | cut -c1-2) | |
wget "https://aur.archlinux.org/packages/$prefix/$package/$package.tar.gz" | |
tar xzf $package.tar.gz | |
rm -f $package.tar.gz | |
cd $package | |
mksrcinfo | |
git init | |
git add . | |
git commit -m "Initial import" | |
git remote add origin "ssh://[email protected]/$package.git" | |
git push origin master | |
cd .. | |
done | |
cd .. | |
echo "Import finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment