mirror of
https://github.com/p8952/bocker.git
synced 2025-11-08 23:24:00 +01:00
Trick sed into always ignoring slashes in $0
This commit is contained in:
parent
103182ad40
commit
3eaea7e44c
2
bocker
2
bocker
@ -71,7 +71,7 @@ btrfs subvolume snapshot "$btrfs_path/$1" "$btrfs_path/$2" > /dev/null
|
||||
echo "Created: $2"
|
||||
}
|
||||
function HELP() {
|
||||
sed -n "s/^.*#HELP\\s//p;" < $1 | sed "s/\\\\n/\n\t/g;s/BOCKER/${1/\//\\\/}/g;s/$/\n/;"
|
||||
sed -n "s/^.*#HELP\\s//p;" < $1 | sed "s/\\\\n/\n\t/g;s/$/\n/;s!BOCKER!${1/!/\\!}!g"
|
||||
}
|
||||
[[ -z "${1-}" ]] && HELP $0 && exit 0
|
||||
case $1 in
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user