mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
selftest: add save.env.sh helper script.
This can be used to store the environment from within make testenv. It can be restored with: . bin/restore.env.source Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
1ce7721b17
commit
3076b1ed44
15
selftest/save.env.sh
Executable file
15
selftest/save.env.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
{
|
||||
vars=`set | \
|
||||
grep "^[a-zA-Z][^=]*='[^']*'$" | \
|
||||
grep -v '^IFS=' | \
|
||||
grep -v '^TERM' | \
|
||||
grep -v '^PPID' | \
|
||||
grep -v '^PS[1-9]=' | \
|
||||
cat `
|
||||
echo "${vars}"
|
||||
echo "${vars}" | sed -e 's!^\([a-zA-Z][^=]*\)=.*$!export \1!'
|
||||
} > bin/restore.env.source
|
||||
|
||||
echo "RUN: '. bin/restore.env.source'"
|
Loading…
Reference in New Issue
Block a user