Update utility scripts in /bin
This commit is contained in:
12
bin/ojusomap-gen-env-sh
Executable file
12
bin/ojusomap-gen-env-sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Spit out environment variables from ./environment and
|
||||
# compiles them into a bash script that will export them
|
||||
|
||||
THISDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
ENV_FILE=$THISDIR/../environment
|
||||
TARGET=$THISDIR/../environment.sh
|
||||
echo "#!/bin/bash" > $TARGET
|
||||
sudo cat $ENV_FILE\
|
||||
| sed -e '/^#/d;/^$/d;s/ /\\ /g;s/</\\</g;s/>/\\>/g'\
|
||||
| sed -e 's/^/export /g' >> $TARGET
|
||||
chmod +x $TARGET
|
Reference in New Issue
Block a user