https://github.com/sambacha/sh3ll
shell scripts for git, ci/cd, etc
https://github.com/sambacha/sh3ll
bash cli scripts shell terminal
Last synced: 3 months ago
JSON representation
shell scripts for git, ci/cd, etc
- Host: GitHub
- URL: https://github.com/sambacha/sh3ll
- Owner: sambacha
- License: cc0-1.0
- Created: 2020-08-15T20:19:09.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-09T13:59:20.000Z (over 2 years ago)
- Last Synced: 2025-10-11T01:57:31.571Z (9 months ago)
- Topics: bash, cli, scripts, shell, terminal
- Language: Shell
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `_s_h_e_l_l`
shell scripts for git, ci/cd, etc
```shell
make -C git -j$(sysctl -n hw.physicalcpu) GIT-VERSION-FILE dist dist-doc
```
```bash
mkfifo pipe
tee out.txt < pipe &
command > pipe
echo $?
```
```sh
# Source: http://fvue.nl/wiki/Bash:_Error_handling
#
#!/bin/bash -eu
# -e: Exit immediately if a command exits with a non-zero status.
# -u: Treat unset variables as an error when substituting.
(false) # Caveat 1: If an error occurs in a subshell, it isn't detected
(false) || false # Solution: If you want to exit, you have to detect the error yourself
(false; true) || false # Caveat 2: The return status of the ';' separated list is `true'
(false && true) || false # Solution: If you want to control the last command executed, use `&&'
```
### mk dmg
```bash
die () {
echo "$*" >&2
exit 1
}
VERSION="`sed -n 's/^GIT_VERSION = //p'