Bug fixes

This commit is contained in:
斟酌 鵬兄 2015-03-23 15:59:03 +08:00
parent 6cb16f170a
commit fdeee997a4
2 changed files with 19 additions and 10 deletions

View File

@ -12,12 +12,14 @@ function __func_help() {
# Run through all sources
SDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/sources
echo "Begin source:"
for i in $( find $SDIR -maxdepth 1 -type f -perm +111 | sort )
do
echo " Source:" $( basename $i )
. $i
if [[ $? -ne 0 ]]; then
echo " .. failed"
fi
done
if [ -d "$SDIR" ]; then
echo "Begin source:"
for i in $( find $SDIR -maxdepth 1 -type f -perm +111 | sort )
do
echo " Source:" $( basename $i )
. $i
if [[ $? -ne 0 ]]; then
echo " .. failed"
fi
done
fi

View File

@ -152,8 +152,14 @@ export EDITOR=vim
# User specific aliases and functions
echo "Source:"
function __ns {
if [ -z "$2" ]; then
PATH="sources/$1"
else
PATH=$1
fi
echo " $1"
__cacheDownload "http://git.astropenguin.net/?p=utils.git;a=blob_plain;f=bash/bashrc/sources/$1;hb=HEAD"
__cacheDownload "http://git.astropenguin.net/?p=utils.git;a=blob_plain;f=bash/bashrc/$PATH;hb=HEAD"
shift
TMPFILE=/tmp/$( cat /proc/sys/kernel/random/uuid )
__cryptd "$__CFILE" "$TMPFILE"
@ -161,6 +167,7 @@ function __ns {
rm $TMPFILE
}
__ns "package.sh" 1
__ns "10_aliases"
__ns "20_fast-greps"
__ns "30_mysql"