Skip to content
Extraits de code Groupes Projets
Vérifiée Valider da95f31d rédigé par Kubat's avatar Kubat
Parcourir les fichiers

The "alias" do nothing in scripts

parent 184578b5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -49,13 +49,12 @@ require() { ...@@ -49,13 +49,12 @@ require() {
for CMD in $*; do for CMD in $*; do
local __cmd=`which $1` local __cmd=`which $1`
[ $? -ne 0 ] && die "Failed to find the '$1' command" [ $? -ne 0 ] && die "Failed to find the '$1' command"
alias $CMD=$__cmd
REQUIREMENTS="$CMD $REQUIREMENTS" REQUIREMENTS="$CMD $REQUIREMENTS"
done done
} }
require \ require \
md5sum mktemp column uuidgen convert montage identify python curl \ md5sum mktemp column uuidgen convert montage identify python curl \
sed tr git sponge ls find jq chmod cat expr sed tr git sponge ls find jq chmod cat expr iconv
__grep=`which egrep` __grep=`which egrep`
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
__grep=`which grep` __grep=`which grep`
...@@ -63,7 +62,6 @@ if [ $? -ne 0 ]; then ...@@ -63,7 +62,6 @@ if [ $? -ne 0 ]; then
warn "Cound not find 'egrep', will use 'grep' instead." \ warn "Cound not find 'egrep', will use 'grep' instead." \
"Please, note that some functionalities may not work with regular expressions." "Please, note that some functionalities may not work with regular expressions."
fi fi
alias grep=$__grep
SELF=`readlink -f "$0"` SELF=`readlink -f "$0"`
MD5=`md5sum $SELF` MD5=`md5sum $SELF`
...@@ -388,7 +386,7 @@ cat << EOF ...@@ -388,7 +386,7 @@ cat << EOF
`__green STPKG_NO_MSG` `__italic $($COLOR_STNOMSG $STPKG_NO_MSG)` `__green STPKG_NO_MSG` `__italic $($COLOR_STNOMSG $STPKG_NO_MSG)`
`__green STPKG_HOMESERV` `__italic $STPKG_HOMESERV` `__green STPKG_HOMESERV` `__italic $STPKG_HOMESERV`
`__green STPKG_TOKEN` $TOKEN `__green STPKG_TOKEN` $TOKEN
`__bold aliased commands due to the '"require"' function:` `__bold required commands due to the '"require"' function:`
safe (system) `__green $SAFE` safe (system) `__green $SAFE`
unsafe (user) $UNSAFE unsafe (user) $UNSAFE
EOF EOF
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter