Per-user tmp files

This commit is contained in:
Kevin Lange 2012-01-18 19:52:11 -06:00
parent 870d93c235
commit 7de2ca9bd1
6 changed files with 8 additions and 7 deletions

View File

@ -31,8 +31,8 @@ DD = dd conv=notrunc
BEG = util/mk-beg
END = util/mk-end
INFO = util/mk-info
ERRORS = 2>>/tmp/.build-errors || util/mk-error
ERRORSS = >>/tmp/.build-errors || util/mk-error
ERRORS = 2>>/tmp/.`whoami`-build-errors || util/mk-error
ERRORSS = >>/tmp/.`whoami`-build-errors || util/mk-error
BEGRM = util/mk-beg-rm
ENDRM = util/mk-end-rm

View File

@ -18,6 +18,7 @@ if [[ "$PROMPT" = "y" ]] ; then
wget "http://dl.dropbox.com/u/44305966/toaru-toolchain-0.0.1.tar.gz"
popd
tar -x -C util/ -f "/tmp/toaru-toolchain-0.0.1.tar.gz"
rm "/tmp/toaru-toolchain-0.0.1.tar.gz"
echo "Done!"
echo "You should now add \033[1;33m`pwd`/util/toaru-toolchain/bin\033[0m to your path"
else

View File

@ -1,7 +1,7 @@
#!/bin/bash
. util/cpad.sh
echo -n > /tmp/.build-errors
echo -n > /tmp/.`whoami`-build-errors
CMD=`cpad "$1" 8 " "`
echo -e -n "\033[32m${CMD}${2}\033[0m\n"

View File

@ -1,7 +1,7 @@
#!/bin/bash
. util/cpad.sh
echo -n > /tmp/.build-errors
echo -n > /tmp/.`whoami`-build-errors
CMD=`cpad "$1" 8 " "`
echo -e -n "\033[31m${CMD}${2}\033[0m\n"

View File

@ -2,8 +2,8 @@
. util/cpad.sh
CMD=`cpad "$1" 8 " "`
if [[ -s /tmp/.build-errors ]] ; then
cat /tmp/.build-errors
if [[ -s /tmp/.`whoami`-build-errors ]] ; then
cat /tmp/.`whoami`-build-errors
echo -e -n "\r\033[1;33m${CMD}${2}\033[0m\n"
else
echo -e -n "\r\033[A\033[1;32m${CMD}${2}\033[0m\033[K\n"

View File

@ -1,6 +1,6 @@
#!/bin/bash
echo -e "\033[1;31m! Fatal error encountered.\033[0m"
cat /tmp/.build-errors
cat /tmp/.`whoami`-build-errors
exit 1