You are not logged in.

#1 2010-02-19 21:32:54

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

[SOLVED] How to make "yaourt" run with "AUR" command?

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 lol

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

#2 2010-02-19 21:38:46

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,757

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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

#3 2010-02-19 21:42:45

Mineo
Member
From: Germany
Registered: 2009-12-13
Posts: 24
Website

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

Add alias aur='yaourt' to your .bashrc/.zshrc/whatever.

/edit: Ah, too slow.

Last edited by Mineo (2010-02-19 21:43:18)

Offline

#4 2010-02-19 22:19:10

Blue Peppers
Member
From: Newbury, UK
Registered: 2009-02-01
Posts: 178

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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 smile


Consistency is not a virtue.

Offline

#5 2010-02-19 22:29:28

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,757

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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

#6 2010-02-20 00:06:24

quarkup
Member
From: Portugal
Registered: 2008-09-07
Posts: 497

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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

#7 2010-02-20 09:24:35

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

Wow, cool. That was easy! big_smile


joe@trusktr.io - joe at true skater dot io.

Offline

#8 2010-02-20 16:03:29

quarkup
Member
From: Portugal
Registered: 2008-09-07
Posts: 497

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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

#9 2010-02-20 19:38:41

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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

big_smile

Last edited by trusktr (2010-02-20 19:41:03)


joe@trusktr.io - joe at true skater dot io.

Offline

#10 2010-02-20 20:19:15

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

ln -s /usr/bin/yaourt /usr/bin/AUR

big_smile

Offline

#11 2010-02-20 20:58:47

tjwoosta
Member
Registered: 2008-12-18
Posts: 453

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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

#12 2010-02-20 21:15:32

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,757

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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

#13 2010-02-20 21:39:56

computron
Member
Registered: 2010-02-18
Posts: 4

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

Yeah, definitely use aliases, not symlinks for this.

Offline

#14 2010-02-20 23:33:27

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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

#15 2010-02-21 06:48:37

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

Why's a symlink wrong?

Offline

#16 2010-02-21 19:31:44

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

(ln -s /usr/bin/yaourt /usr/bin/AUR)

What does this actually do??


joe@trusktr.io - joe at true skater dot io.

Offline

#17 2010-02-21 19:57:34

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,757

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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

#18 2010-02-21 21:49:44

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

Good point. The .bashrc method is much simpler and neat. smile


joe@trusktr.io - joe at true skater dot io.

Offline

#19 2010-02-21 22:02:11

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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 smile Btw mark topic as solved ^^

Offline

#20 2010-02-21 22:13:59

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

hehe well noted! smile 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 smile

(Status changed to solved smile)


joe@trusktr.io - joe at true skater dot io.

Offline

#21 2010-02-21 22:25:07

fsckd
Forum Moderator
Registered: 2009-06-15
Posts: 4,105

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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

#22 2010-02-21 22:37:42

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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 wink


joe@trusktr.io - joe at true skater dot io.

Offline

#23 2010-02-21 23:06:02

fsckd
Forum Moderator
Registered: 2009-06-15
Posts: 4,105

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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

#24 2010-02-21 23:25:14

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

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

#25 2010-02-21 23:49:37

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,171

Re: [SOLVED] How to make "yaourt" run with "AUR" command?

yaourt? hmmmmmmmmm. You should look into packer. smile
It's very fast and clean. Many times faster, in fact.

Offline

Board footer

Powered by FluxBB