Fixed some installation and environment setting issues.

This commit is contained in:
k1574 2020-11-04 04:24:45 +05:00
parent 418dd83d89
commit 6467a4e60e
7 changed files with 20 additions and 39 deletions

View file

@ -18,6 +18,13 @@ export_loop(){
# Standard variables.
export_loop \
ENV '$HOME/.shrc' \
LIB '$HOME/lib' \
IMG '$HOME/img' \
SND '$HOME/snd' \
DOC '$HOME/doc' \
VID '$HOME/vid' \
LOAD '$HOME/load' \
TXT '$HOME/txt' \
SHPROMPT '"% "' \
PS1 '"$SHPROMPT"' \
SUDO_PROMPT '"#"' \
@ -27,15 +34,12 @@ export_loop \
PAGER 'less' \
MANPAGER '$PAGER' \
PROFILE '$HOME/.profile' \
TXT '$HOME/txt' \
TMPL '$HOME/tmpl' \
APP '$HOME/APP' \
ENVDIR '$LOCAL/env' \
GIT '$LOCAL/git' \
ETC '$LOCAL/etc' \
SETENV '$ETC/env/setenv' \
TMP '$LOCAL/tmp' \
SHR '$LOCAL/shr' \
APP '$HOME/app' \
ENVDIR '$HOME/env' \
SETENV '$LIB/setenv/sh' \
TMP '$HOME/tmp' \
SHR '$HOME/shr' \
MNT '$HOME/mnt' \
EXE '$EXE/bin' \
GOPATH '$APP/go' \
@ -46,17 +50,11 @@ export_loop \
PLAN9PORT '$APP/plan9' \
PLAN9 '$PLAN9PORT' \
INFERNO '$APP/inferno' \
LIB '$HOME/lib' \
IMG '$HOME/img' \
SND '$HOME/snd' \
DOC '$HOME/doc' \
VID '$HOME/vid' \
LOAD '$HOME/load' \
XDG_CONFIG_HOME '$LIB' \
XDG_RUNTIME_DIR '$TMP' \
XDG_DATA_HOME '$APP' \
LOGIN '$LIB/login/sh' \
PATH '$EXE:$PATH:$GOEXE:$PLAN9BASE/bin:$PLAN9PORT/bin:$VEXE' \
test -r $SETENV && . "$SETENV.sh" && setenv profile
test -r $SETENV && . "$SETENV" && setenv profile

View file

@ -1 +1 @@
../lib/profile
../../profile

View file

@ -1,13 +1,5 @@
#!/bin/sh
if test -r "$LOGIN.sh" ; then
. "$LOGIN.sh"
fi
test -r "$LOGIN" && . "$LOGIN"
PS1="$SHPROMPT"
test -r "$SETENV" && . "$SETENV" && setenv sh
if test -r "$SETENV.sh" ; then
. "$SETENV.sh"
setenv sh
fi

View file

@ -1,9 +0,0 @@
session=$(1:-sway)
shift
arg="$@"
# The same as xinitrc, but for Wayland programs.
case "$session" in
sway ) exec sway $arg;;
# Not found any specific.
* ) exec $session $arg ;;
esac

View file

@ -3,7 +3,7 @@ rpath = `{dirname `{readlink -f $0}}
dot = $rpath/file
for(i in $dot/*){
ln = $home/.`{basename $i}
rm -f $ln
rm -rf $ln
echo $ln $i
ln -s $i $ln
}

View file

@ -3,7 +3,7 @@ rpath="$(dirname `readlink -f $0`)"
dot="$rpath/file"
for i in $dot/* ; do
ln="$HOME/.`basename $i`"
rm -f "$ln"
rm -rf "$ln"
echo $ln $i
ln -s "$i" "$ln"
done

View file

@ -13,14 +13,14 @@ if [ -d "$ENVDIR" ] ; then
# Set variables from files.
sh="$1"
for i in "$ENVDIR/$sh/var"/* ; do
for i in "$ENVDIR/$sh/var"/* ; do
if test -r "$i" ; then
export "`basename \"$i\"`"="`cat \"$i\"`"
fi
done
# Modules.
for i in "$ENVDIR/$sh"/*.sh ; do
for i in "$ENVDIR/$sh/rc"/*; do
if test -r "$i" ; then
. "$i"
fi