Scott J

Results 31 comments of Scott J

Yeah I'm a terrible offender for this - calling sub shells, and checking output when return codes will suffice.. But I always use 2 spaces for indentation, as it works...

## Fixing indentation I've never heard of it till just now, but there is apparently the `expand` command, which can be used to fix indentation. From https://stackoverflow.com/a/11094620/5479837 : ``` find...

## If we _do_ need sub-shells Should we always be using `$()` instead of back ticks? > The major benefit is the ability to nest `$()` commands within commands, without...

## Redirecting or suppressing output What is preferred? ``` foo >/dev/null 2>&1 # or foo &>/dev/null ``` Because I personally like doing it this way, as I find it's the...

## Using [Shellcheck](https://chromium.googlesource.com/chromiumos/third_party/shellcheck/+/HEAD/README.md) to improve your shell scripts ``` # shellcheck Usage: shellcheck [OPTIONS...] FILES... -e CODE1,CODE2.. --exclude=CODE1,CODE2.. exclude types of warnings -f FORMAT --format=FORMAT output format -C[WHEN] --color[=WHEN] Use...

Maybe this `readme` could include stuff about using standardised or consistent directories and locations for scripts, config files, etc. ## Managing $HOME It might be nice to have in a...

> sc0ttman's pkg was great and powerful tool however his code was too outdated lag behind PPM with huge improvements such as package downgrade/upgrade. What if I fork the pkg?...

Update to the above: ``` # pkg usage update Usage: pkg update PKGNAME Download and install the newest version available of PKGNAME found in any supported repositories. If PKGNAME is...

If you're unsure what command Pkg has, or how to use them do `pkg help` or `pkg usage`: ``` # pkg usage Usage: pkg usage CMD Commands: add-repo get-only repo-convert...

Yeah i've seen what changes you've done - mostly updating `~/.packages/` to `/var/packages`, and replacing hard coded paths with variables.. and post install cache fixes, and some stuff about settings...