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 | |
BW=8 | |
#using realpath = linux dependent i believe | |
HOMEDIR=`realpath ~` | |
LAYER_CACHE="${HOMEDIR}/.docker_layer_cache" | |
if [[ "$1" == "BW:"* ]]; then | |
NEWBW=`echo $1|cut -d: -f2` | |
if [ "$NEWBW" != "" ]; then | |
BW=$NEWBW |
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/bash | |
#do we wanna limit bandwidth? pass argument BW:limit (ie: BW:10) | |
if [[ "$1" == "BW:"* ]]; then | |
NEWBW=`echo $1|cut -d: -f2` | |
if [ "$NEWBW" != "" ]; then | |
BW="--limit-rate=${NEWBW}k" | |
echo using bw limit ${NEWBW} | |
fi | |
shift |