22 lines
312 B
Bash
22 lines
312 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
# Best practice options
|
||
|
set -o errexit
|
||
|
set -o nounset
|
||
|
set -o pipefail
|
||
|
if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi
|
||
|
|
||
|
cd "$(dirname "$0")"
|
||
|
|
||
|
main() {
|
||
|
export BW_SESSION=$(
|
||
|
bw unlock --passwordfile ~/.bwpass |
|
||
|
grep "\--session " |
|
||
|
awk '{print $NF}'
|
||
|
)
|
||
|
aerc
|
||
|
}
|
||
|
|
||
|
main "$@"
|
||
|
|