Skip to content

Commit

Permalink
set HOME and REAL_HOME when GSH_HOME is created
Browse files Browse the repository at this point in the history
  • Loading branch information
phyver committed Jun 17, 2021
1 parent ce00abe commit 82196b7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
4 changes: 1 addition & 3 deletions bin/progress_bar.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/sh

# this script should be source with the command to monitor as argument
# this script should be sourced with the command to monitor as argument
# it depends on arguments being passed to a sourced script, which is not
# the case in POSIX, but does work in bash or zsh
# one way to use with a POSIX shell is to do set ARGV manually with
Expand Down
2 changes: 0 additions & 2 deletions bin/save_environment.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/bash

# this script should be **sourced**
# it will output the current environment: names of variables, functions,
# aliases and processes
Expand Down
3 changes: 0 additions & 3 deletions lib/profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,3 @@ then
Aborting!")"
exit 1
fi


# vim: shiftwidth=2 tabstop=2 softtabstop=2
5 changes: 4 additions & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ do
then
export LANGUAGE=$OPTARG
else
if locale -a | grep -x "$OPTARG" >/dev/null
if locale -a | grep -qx "$OPTARG"
then
export LC_MESSAGES=$OPTARG
else
Expand Down Expand Up @@ -198,6 +198,9 @@ Do you want to remove it and start a new game? [y/N]') "

# recreate them
mkdir -p "$GSH_HOME"
# change the HOME dir, but save the "real" one in a variable
export REAL_HOME="$HOME"
export HOME="$GSH_HOME"

mkdir -p "$GSH_CONFIG"
awk -v seed_file="$GSH_CONFIG/PRNG_seed" 'BEGIN { srand(); printf("%s", int(2^32 * rand())) > seed_file; }'
Expand Down

0 comments on commit 82196b7

Please sign in to comment.