You are not logged in.
I want to change the yaourt command so i can use something like aur or AUR.
for example, instead of
yaourt -S package-name-here
I want to use
AUR -S package-name-here
so that it's easier to type. "yaourt" is such an odd string to type! hehe
I think i might use something like this:
function AUR {
**something like: exec /.../yaourt**
**and some other code to pass on -S or -U conditions...etc**
}
Can someone tell me what to put in this function and where to save it to?
Also, What's better: using the yaourt call above or the following custom function (instead of yaourt):
function AUR {
cd $aurdir
wget http://aur.archlinux.org/packages/$1/$1.tar.gz && tar -xzf $1.tar.gz && rm $1.tar.gz && cd $1 && makepkg -s
pacman -U **some code goes here to output the correct filename**
}
I have to think to myself "yeah our t" to type yaourt (haha) so to think "AUR" is much simpler, since that's what we're getting packages from anyways.
Last edited by trusktr (2010-02-21 22:14:20)
joe@trusktr.io - joe at true skater dot io.
Offline
Add an alias to your .bashrc alias aur="yaourt ... "
Last edited by loafer (2010-02-19 21:40:14)
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
Add alias aur='yaourt' to your .bashrc/.zshrc/whatever.
/edit: Ah, too slow.
Last edited by Mineo (2010-02-19 21:43:18)
Offline
To force yaourt to install from AUR, you could add the --aur option to the command; i.e. alias AUR="yaourt --aur"
However, that's probably not necessary
Consistency is not a virtue.
Offline
Thinking about it, even better advice is to also search the various aur helpers on offer and choose one which is still being developed and maintained. Then work out the best way to use it ...
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
alias aur='yaourt -S';
like
~ $ aur firefox-pgo chromium
this will build firefox-pgo from AUR and install chromium from the pacman repo's (the binaries)
you could try
alias yb='yaourt -Sb';
and now you will build the firefox-pgo from AUR and build chromium from ABS (if not on AUR)
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
Wow, cool. That was easy!
joe@trusktr.io - joe at true skater dot io.
Offline
you should add those two lines to your ~/.bashrc file
like
echo "alias aur='yaourt -S';" >> ~/.bashrc
echo "alias yb='yaourt -Sb';" >> ~/.bashrc
then just use yb and aur..
note: you should reopen the terminal/bash to use these new settings on bash, or execute: source ~/.bashrc
Last edited by quarkup (2010-02-20 16:28:52)
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
awesome, so I put this exact line in my ~/.bashrc file:
alias AUR="yaourt";
so now
AUR -S some-package
is exactly the same as
yaourt -S some-package
Last edited by trusktr (2010-02-20 19:41:03)
joe@trusktr.io - joe at true skater dot io.
Offline
ln -s /usr/bin/yaourt /usr/bin/AUR
Offline
alias update='yaourt -Syu --aur'
alias search='yaourt -Ss'
alias install='yaourt -S'
alias remove='yaourt -Rs'
alias query='yaourt -Q'
alias abs='sudo abs'
Offline
Just bear in mind that yaourt is not the only aur helper available, you can use the aliases with the others too.
Do not use the corex method, that is not right at all.
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
Yeah, definitely use aliases, not symlinks for this.
Offline
haha why is Corex's method not right? (ln -s /usr/bin/yaourt /usr/bin/AUR)???
joe@trusktr.io - joe at true skater dot io.
Offline
Why's a symlink wrong?
Offline
(ln -s /usr/bin/yaourt /usr/bin/AUR)
What does this actually do??
joe@trusktr.io - joe at true skater dot io.
Offline
It's a symbolic link. Basically just a special file type that's a link (a reference if you like) to another file. In this case the yaourt binary.
Personally I would not use it in this case because:
1) .bashrc provides a much simpler way of achieving what you need.
2) When you uninstall yaourt the symlink will be left behind (it's untidy).
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
Good point. The .bashrc method is much simpler and neat.
joe@trusktr.io - joe at true skater dot io.
Offline
When and if one uninstalls yaourt, still gonna leave the aliases in the .bashrc... that's untidy too... Wich is more simple, "ln -s /usr/bin/yaourt /usr/bin/AUR <enter>" or "nano ~/.bashrc <enter> alias AUR='yaourt' <ctrl+x> <y> <enter>" ... It's better to use aliases in .bashrc because you can do so much more and get to learn alil bit more for future reference, but the reasons for not symlinking it's really not that bad. If you've ever used windows for example, symlink works almost the same as creating a shortcut to an application on the desktop, once unistalled the application, you manually have to delete the shortcut. Aliases is the proper way to go, i didn't know this at all.. I just symlinked to yaort but after reading this i switched to alias Btw mark topic as solved ^^
Offline
hehe well noted! Often times too in Windows the shirtcuts that are created are deleted on uninstall, but manual ones of course aren't, just as manual symlinks here won't be deleted either.
But yeah, aliases is the way to go and you can edit them all in one file
(Status changed to solved )
joe@trusktr.io - joe at true skater dot io.
Offline
If you were to automate management of your AUR command, you would use symlinks (à la Debian's alternatives).
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
what do you mean by automate? Do you mean like if you want to make a GUI application, for example, then the app would need a symlink to call yaourt? I bet the app can just call the AUR alias
joe@trusktr.io - joe at true skater dot io.
Offline
No, I mean if you want a program to set the alias for you. Right now, I assume, you are the one typing it in.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
Yeah, that's correct. I thought about installing a graphical pacman/aur app, but i opted to just do that manually so i know what i'm doing.
joe@trusktr.io - joe at true skater dot io.
Offline
yaourt? hmmmmmmmmm. You should look into packer.
It's very fast and clean. Many times faster, in fact.
Offline