4 Aug 2019 |
darnir | I would've done sed '/set -o pipefail/d' | 19:17:16 |
darnir | On all the files in the repo | 19:17:41 |
AppAraat | I have a shellscript which automatically sets up key based SSH access which is as POSIX as I could make it, unfortunately though Gitlab botched the removal of the repo so now it's on GH: https://github.com/absorber/sshstuff | 19:17:51 |
AppAraat | darnir: that also includes files in the .git* dir | 19:18:10 |
errhammr moved to a different home server | shellcheck doesn't complain about nothin... | 19:20:52 |
darnir | In reply to @AppAraat:matrix.org darnir: that also includes files in the .git* dir No of course not. You pipe the list of files from git ls—tree | 19:22:14 |
darnir | Or just from find src/ | 19:22:34 |
AppAraat | some of them are also in tests | 19:22:57 |
AppAraat | errhammr: did you use the web version? | 19:23:10 |
darnir | On phone so it's hard to type in the full command | 19:23:56 |
AppAraat | I did the following: find "$PWD" -type f -name ".*" -prune -o -print0 | xargs -0 sed -i /"set -o pipefail"/d | 19:28:36 |
AppAraat | that find command was the most POSIX way to do it according to a SO answer I closed unfortunately | 19:29:05 |
AppAraat | * that find command was the most POSIX way to do it according to a SO answer (the tab of which I closed already unfortunately) | 19:29:23 |
errhammr moved to a different home server | In reply to @AppAraat:matrix.org errhammr: did you use the web version? I used the local one that is in the Ubuntu repos | 19:36:08 |
AppAraat | big chance that one might be outdated | 19:36:29 |
darnir | Is -exec not a POSIX extension for find? | 19:36:53 |
errhammr moved to a different home server | $ shellcheck --version
ShellCheck - shell script analysis tool
version: 0.4.6
license: GNU General Public License, version 3
website: http://www.shellcheck.net
| 19:37:34 |
darnir | That's quite old | 19:38:05 |
darnir | 0.7 came out a few days ago | 19:38:22 |
errhammr moved to a different home server | Already compiling from github | 19:44:02 |
AppAraat | darnir: it might be, but here's where I got that command from: https://askubuntu.com/a/749708 | 20:10:39 |
darnir | Sure. But instead of print0 and xargs you could just call -exec sed ... {} \; | 20:13:35 |
darnir | Unless exec is a GNU extension to find. I'm not sure about that | 20:14:05 |
AppAraat | apparently it's in POSIX yeah: https://pubs.opengroup.org/onlinepubs/009695399/utilities/find.html - TIL | 20:18:11 |
errhammr moved to a different home server | A useful feature that is included in POSIX? Wow | 20:38:13 |
5 Aug 2019 |
| @ralfi:matrix.org left the room. | 12:44:16 |
darnir | AppAraat: Awaiting the PR from you | 19:06:43 |
swedneck:permaweb.io | hi, how do i use this? | 19:34:31 |
swedneck:permaweb.io | i see no install instructions anywhere | 19:34:41 |
darnir | swedneck:permaweb.io: Hi | 19:34:55 |