grep -P isn't supported by busy box

This commit is contained in:
Kevin Cotugno 2018-11-22 11:11:32 -08:00
parent a727341b56
commit 8930b1d426

View File

@ -22,5 +22,11 @@ if [[ -e $file ]]; then
fi fi
fi fi
export `ssh-agent -s | grep -oP "^.+(?=; export)" | tee "$file"` export $(ssh-agent -s |
awk '{
if ($1 ~ ".*=.*;") {
print substr($1, 0, length($1) - 1)
}
}' |
tee "$file")
chmod 600 "$file" chmod 600 "$file"