You are not logged in.

#1 2013-02-15 00:23:49

stylish-mushroom
Member
Registered: 2013-01-26
Posts: 4

alpaca package manager (minimalist bash pacman/AUR frontend)

Hi all,

For a while now I've been using a homemade script for package management via yaourt, so I thought I'd put it out there for anyone who might be interested. I rarely do any package management beyond basic add/remove/update, and I only use a web browser for package searching, so I put together a clean bash interface that only does three things: install (yaourt -S), remove (-Rs), and update (-Syua). Although I like using the command line, I find it satisfying to eliminate typing these commands every time, and to have a dedicated program for package management.

AUR: https://aur.archlinux.org/packages/alpaca/

Google code (includes screenshots): https://code.google.com/p/arch-alpaca/

Last edited by stylish-mushroom (2013-02-18 13:44:28)

Offline

#2 2013-02-15 05:05:27

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,058

Re: alpaca package manager (minimalist bash pacman/AUR frontend)

So why not just use aliases?

Offline

#3 2013-02-15 08:11:29

stylish-mushroom
Member
Registered: 2013-01-26
Posts: 4

Re: alpaca package manager (minimalist bash pacman/AUR frontend)

anonymous_user wrote:

So why not just use aliases?

Thanks for the suggestion, but aliases don't quite give me the package management experience I want. I personally find it neater to pick an option from a menu rather than memorize new commands. This is especially the case when, using a script like this, an option is selected with a single keystroke (no need to hit enter); by reducing keystrokes to the absolute minimum, this gives the whole package management process a "snappyness" I really like.

Offline

#4 2013-02-15 11:31:03

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,476
Website

Re: alpaca package manager (minimalist bash pacman/AUR frontend)

A wrapper for a wrapper?

taGd5bw


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#5 2013-02-15 12:02:55

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: alpaca package manager (minimalist bash pacman/AUR frontend)

sh /usr/bin/alpaca won't work if it's in a different place and it's bad practice. You have some code left from a while loop like break and done, so use that instead. exit at the end isn't needed.

And you should look into dialog, it's really a lot of fun. Try running this code:

pkg=$(dialog --stdout --title ALPACA --ok-label Install --extra-button --extra-label Remove --cancel-label Update --inputbox package: 0 0)
case $? in
0) [[ $pkg ]] && echo Installing $pkg;;
3) [[ $pkg ]] && echo Removing $pkg;;
1) echo Updating system;;
esac

Offline

#6 2013-02-16 04:21:35

stylish-mushroom
Member
Registered: 2013-01-26
Posts: 4

Re: alpaca package manager (minimalist bash pacman/AUR frontend)

Thanks for the feedback Procyon, I've incorporated it into an overhaul of the script. I also enjoyed messing around with dialog for a while.

Alpaca is now just a pacman wrapper (no yaourt) with four options: install official, install AUR, remove, system update.

AUR: https://aur.archlinux.org/packages/alpaca/

Google code (includes screenshots): https://code.google.com/p/arch-alpaca/

At any rate I'm having fun learning basic bash scripting smile

Offline

#7 2013-02-19 16:21:35

stylish-mushroom
Member
Registered: 2013-01-26
Posts: 4

Re: alpaca package manager (minimalist bash pacman/AUR frontend)

alpaca 3.0.0 released...feature list is now:

- install/remove/update official+AUR
- list explicitly installed official/unofficial packages

Offline

Board footer

Powered by FluxBB