Renamed cmdline args to BOCKER_ prefix

This commit is contained in:
Chris F Ravenscroft 2015-08-03 14:18:53 -07:00
parent 4956a537b7
commit 747c8b251f

1
bocker
View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -o errexit -o nounset -o pipefail; shopt -s nullglob
btrfs_path='/var/bocker' && cgroups='cpu,cpuacct,memory';
[[ $# -gt 0 ]] && while [ "${1:0:2}" == '--' ]; do OPTION=${1:2}; [[ $OPTION =~ = ]] && declare "BOCKER_${OPTION/=*/}=${OPTION/*=/}" || declare "BOCKER_${OPTION}=x"; shift; done
function bocker_check() {
btrfs subvolume list "$btrfs_path" | grep -qw "$1" && echo 0 || echo 1