penguin/utils

my env utils

commit 5cdb134ebc5bfffe2dbcddb55823b9b4b0871abb

author斟酌 鵬兄 <tgckpg@gmail.com>
date2016-05-12T02:45:34Z
subjectrbashrun can now run from root
commit 5cdb134ebc5bfffe2dbcddb55823b9b4b0871abb
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2016-05-12T02:45:34Z

    rbashrun can now run from root
---
 bash/bashrc/rbashrc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/bash/bashrc/rbashrc b/bash/bashrc/rbashrc
index 6925123..0acc496 100644
--- a/bash/bashrc/rbashrc
+++ b/bash/bashrc/rbashrc
@@ -179,14 +179,15 @@ function rbash_upgrade {
 
 function rbash_run {
     echo "Getting: $1"
-    __cacheDownload "http://git.astropenguin.net/?p=utils.git;a=blob_plain;f=bash/$1;hb=HEAD"
+    __cacheDownload "http://git.astropenguin.net/?p=utils.git;a=blob_plain;f=$1;hb=HEAD"
     shift
     __uuid TMPID
     TMPFILE=/tmp/$TMPID
     __cryptd "$__CFILE" "$TMPFILE"
 
-    bash "$TMPFILE" $@
-    rm "$TMPFILE";
+    chmod 700 "$TMPFILE"
+    "$TMPFILE" $@
+    rm "$TMPFILE"
 }
 
 export PS1='This is <MACHINE_NAME>\e[1;3<COLOR_CODE>m<MACHINE_COLORED_NAME>\e[0m: \w\n\$ '