[arch-general] package manager overlay script
Andre "Osku" Schmidt
andre.osku.schmidt at osku.de
Fri Apr 16 06:37:20 EDT 2010
On Thu, 2010-04-15 at 16:15 +0300, Rogutės Sparnuotos wrote:
> Andre Osku Schmidt (2010-04-15 14:17):
> > Hello,
> >
> > im getting tired to be forced to remember many different options for
> > various package managers on different distros. so i did a little script
> > that allows me to do like "asd install foo" on any distro i got that
> > script installed, and it will install the package using the systems
> > package manager.
> >
> > so, before i hack this script to a better state, i was wondering does
> > this kind of script/project already exist ?
>
> Hi,
>
> Aren't shell aliases enough for this job?
>
> if [ -f /etc/arch-release ]; then
> alias list="pacman -Ql"
> alias owns="pacman -Qo"
> alias sea="pacman -Ss"
> alias inst="sudo pacman -S"
> alias rem="sudo pacman -Rsn"
> elif [ -f /etc/debian_version ]; then
> alias list="dpkg-query -L"
> alias owns="dpkg-query -S"
> alias sea="aptitude search"
> alias rem="aptitude purge"
> elif [ -f /etc/exherbo-release ]; then
> alias list="paludis -k"
> alias owns="paludis --full-match -o"
> function rem() {
> paludis -u --with-unused-dependencies -p $@ && \
> read -q '?Continue [y/N]: ' && \
> paludis -u --with-unused-dependencies $@
> }
> fi
>
yes, but i see couple issues with this.
1. you cant use "install" as alias (assuming system has coreutils)
2. maybe someone already has aliases named like these
3. how do you get the list of these commands if you forgot
and then let the user to name them like he/her wants is not an option,
as then the whole purpose is gone: one command, any distro.
i then assume that this kind of project doesnt exist cause no one needs
it or not all can/could settle on one command and options...
i can already imagine some update versus upgrade "flame wars" ;P
and i just realised, to make this kind of tool more useful, it would be
nice if the output were formatted the same way on any distro...
(this probably would involve lot of bash coding, or using apis)
well, in the mean time, heres what i'm using/hacking
http://gitorious.org/asd
and as im a fresh arch user, if you have any tips on using pacman,
please bash me :) (i just copied the commands from pacman rosetta)
cheers
.andre
ps. it's called "asd" only cause it seemed the fastest keys to type on
many keyboard layouts ;P
pps. it's not really in a state i would recommend anyone to use it, but
it suits my needs, and i'm more interested on hacking other things atm.
More information about the arch-general
mailing list