summaryrefslogtreecommitdiff
path: root/selftest/save.env.sh
blob: 9906f95e1ae552de180c763c104d1737138a7547 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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'"