Sourcing by the script name itself
This commit is contained in:
parent
8d98222094
commit
060c48487e
@ -4,6 +4,8 @@ case $- in
|
|||||||
*) return;;
|
*) return;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
__SCRIPT=$( pwd )$BASH_SOURCE
|
||||||
|
|
||||||
# Source global definitions
|
# Source global definitions
|
||||||
if [ -f /etc/bashrc ]; then
|
if [ -f /etc/bashrc ]; then
|
||||||
. /etc/bashrc
|
. /etc/bashrc
|
||||||
@ -137,7 +139,7 @@ function __uuid {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function rbash_upgrade {
|
function rbash_upgrade {
|
||||||
echo "Updating the .bashrc"
|
echo "Updating $__SCRIPT"
|
||||||
__uuid TMPID
|
__uuid TMPID
|
||||||
TMPFILE=/tmp/$TMPID
|
TMPFILE=/tmp/$TMPID
|
||||||
__download "http://git.astropenguin.net/?p=utils.git;a=blob_plain;f=bash/bashrc/rbashrc;hb=HEAD" > $TMPFILE
|
__download "http://git.astropenguin.net/?p=utils.git;a=blob_plain;f=bash/bashrc/rbashrc;hb=HEAD" > $TMPFILE
|
||||||
@ -167,8 +169,8 @@ function rbash_upgrade {
|
|||||||
-e "s/$COLOR_CODE_TOK/$COLOR_CODE/g" \
|
-e "s/$COLOR_CODE_TOK/$COLOR_CODE/g" \
|
||||||
$TMPFILE
|
$TMPFILE
|
||||||
|
|
||||||
mv $TMPFILE ~/.bashrc
|
mv $TMPFILE $__SCRIPT
|
||||||
. ~/.bashrc
|
. $__SCRIPT
|
||||||
}
|
}
|
||||||
|
|
||||||
function rbash_run {
|
function rbash_run {
|
||||||
|
Loading…
Reference in New Issue
Block a user