Skip to content

Pakka: A simple bash AUR helper

Hi,

I am working on this little script for AUR.

I created it as a part of my config files for specifically overridding certain parts of the makepkg process. It's far from complete.

https://github.com/SidharthArya/pakka

I am looking for suggestions/feedbacks/contributions.

Thank You

15 points26 comments
Open on Reddit
About this post
Posted
Archived
Score
15 · 89% up
Kind
Text
ID
opxbot

Author

3
posts
23
comments
1
media
View profile

32 comments

It's Arch[space]Linux.

Your project does not have a license.

You *REALLY* should enable the 'unofficial bash strict mode' for all your bash scripts, else you'll introduce random bugs that you probably won't even notice.

19 points
  • Not using git to get the PKGBUILD = WTF? git ensures integrity, makes sure the history is sane, and also helps quite a lot if you need to diff the previous versions of the build files (PKGBUILD, patches, .install, etc.). This is a security incident waiting to happen.
  • CACHEDIR is not set? Look at the XDG spec
  • You're using POSIX sh [ when you should use bash [[
  • makepkg -si || is a good way to catch makepkg failing, but it can fail not only because of checksum mismatches (build failure, can't apply patches, etc.). makepkg(8) has "sane" exit codes, use them ($?)
13 points

You forhow to add '-L' flag to curl and convert --output --> -o or just use '-O' flag to save normally.

4 points

Thanks

2 points

No problem :) I also made some mistakes like this in past. you can use 'curl ftp://ftp.file.org/file -o file' in interactive terminal, this won't work in shell scripts, and that's why you have to add '-L' flag. '-O' flag is also useful. It downloads the file as wget - without specyfying output location

1 points

One suggestion could be to use #!/bin/sh instead of just bash, reason being that most arch systems will have that be dash, which can be much faster than bash. although if you do go through with that, id be careful cuz you have to make sure you scripts are POSIX complaint and not have bash specific stuff

1 points

I really doubt that most arch users symlink dash to /bin/sh, however I am one of them and I do really appreciate when people make their scripts posix compliant. If you do go that route shellcheck will tell you when something is bash-only, assuming you have the correct shebang.

4 points
unknown author

Deleted before we saved it.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.