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
About this post
- Posted
- Archived
- Score
- 15 · 89% up
- Kind
- Text
- ID
- opxbot
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.
Hi
Thanks a lot. I have incorporated the changes you suggested.
also, https://github.com/koalaman/shellcheck
"Strict mode" isn't really a catch all and can leave you with a false sense of security. See Bash Pitfalls.
And nowhere did I claim it's a coding panacea.
Thanks
[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 ($?)This is soooo helpful. Thank you.
Deleted before we saved it.
lol
Deleted before we saved it.
warh gaye
You forhow to add '-L' flag to curl and convert --output --> -o or just use '-O' flag to save normally.
Thanks
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
One suggestion could be to use
#!/bin/shinstead 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 stuffI 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.
Deleted before we saved it.
True
Yeah I will surely look into it. Thank You.
Deleted before we saved it.