This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Read a single char from /dev/tty, prompting with "$*" | |
| # Note: pressing enter will return a null string. Perhaps a version terminated with X and then remove it in caller? | |
| # See https://unix.stackexchange.com/a/367880/143394 for dealing with multi-byte, etc. | |
| function get_keypress { | |
| local REPLY IFS= | |
| >/dev/tty printf '%s' "$*" | |
| [[ $ZSH_VERSION ]] && read -rk1 # Use -u0 to read from STDIN | |
| # See https://unix.stackexchange.com/q/383197/143394 regarding '\n' -> '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ########################### | |
| # Validate .gitlab-ci.yml # | |
| # by Peter Weinert # | |
| ########################### | |
| lif [[ "$OSTYPE" == "darwin"* ]]; then | |
| SED_BIN="gsed" | |
| command -v "gsed" >/dev/null 2>&1 || { echo >&2 "I require gsed but it's not installed. Install with 'brew install gnu-sed'. Aborting."; exit 1; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| [ "$EUID" -ne 0 ] && { echo >&2 "Please run as root or with sudo"; exit 2; } | |
| INSTALL_LOCATION="/usr/local/bin/docker-machine" | |
| REPO=docker/machine | |
| VERSION=`curl -s "https://github.com/${REPO}/releases/latest/download" 2>&1 | grep -Po [0-9]+\.[0-9]+\.[0-9]+` | |
| [ -z "$VERSION" ] && echo >&2 "Could not get latest version from ${REPO}!" | |
| if command -v docker-machine >/dev/null 2>&1; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| [ "$EUID" -ne 0 ] && { echo >&2 "Please run as root or with sudo"; exit 2; } | |
| INSTALL_LOCATION="/usr/local/bin/docker-machine" | |
| REPO=docker/machine | |
| VERSION=`curl -s "https://github.com/${REPO}/releases/latest/download" 2>&1 | grep -Po [0-9]+\.[0-9]+\.[0-9]+` | |
| [ -z "$VERSION" ] && echo >&2 "Could not get latest version from ${REPO}!" | |
| if command -v docker-machine >/dev/null 2>&1; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| [ "$EUID" -ne 0 ] && { echo >&2 "Please run as root or with sudo"; exit 2; } | |
| INSTALL_LOCATION="/usr/local/bin/docker-machine" | |
| REPO=docker/machine | |
| VERSION=`curl -s "https://github.com/${REPO}/releases/latest/download" 2>&1 | grep -Po [0-9]+\.[0-9]+\.[0-9]+` | |
| [ -z "$VERSION" ] && echo >&2 "Could not get latest version from ${REPO}!" | |
| if command -v docker-machine >/dev/null 2>&1; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| LANG_CODE="en" | |
| LANG_NAME="English" | |
| ARCH="x64" | |
| OUTPUT_DIR="/tmp" | |
| # Get Lock so we can only have one instance of this script running | |
| exec {lock_fd}>"/var/lock/`basename "$0"`" || exit 1 | |
| flock -n "$lock_fd" || { echo "ERROR: flock() failed." >&2; exit 1; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| image: docker:19.03.1 | |
| before_script: | |
| - docker info | |
| - echo "$CI_REGISTRY_PASSWORD" | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY | |
| build_image: | |
| stage: build | |
| script: | |
| - docker pull $CI_REGISTRY_IMAGE:latest || true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ###################### | |
| ### Kernel headers ### | |
| ###################### | |
| #To build this module from source, I did the following on my RPI2. | |
| #Install build tools: | |
| sudo -s | |
| apt install build-essential bc git wget |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ###################### | |
| ### Kernel headers ### | |
| ###################### | |
| #To build this module from source, I did the following on my RPI2. | |
| #Install build tools: | |
| sudo -s | |
| apt install build-essential bc git wget |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| awk '{$1=$1};1' |