Swapped all static ls with $SOSGIT_LS variable

This commit is contained in:
JeremyStarTM 2022-08-14 21:24:13 +02:00
parent efff7f1bea
commit 286c027b45

View file

@ -191,7 +191,7 @@ function loadSystemConfiguration() {
echo -e "$SOSGIT_EXITSTRING" &> /etc/sostools/git/sos-git.conf echo -e "$SOSGIT_EXITSTRING" &> /etc/sostools/git/sos-git.conf
fi fi
if [ -d "/etc/sostools/git/sos-git.conf.d/" ]; then if [ -d "/etc/sostools/git/sos-git.conf.d/" ]; then
for file in $(/bin/ls --color=never -w 1 "/etc/sostools/git/sos-git.conf.d/");do for file in $($SOSGIT_LS --color=never -w 1 "/etc/sostools/git/sos-git.conf.d/");do
source "/etc/sostools/git/sos-git.conf.d/${file}" source "/etc/sostools/git/sos-git.conf.d/${file}"
done done
fi fi
@ -210,7 +210,7 @@ function loadUserConfiguration() {
fi fi
fi fi
if [ -d "$HOME/.sostools/git/sos-git.conf.d/" ]; then if [ -d "$HOME/.sostools/git/sos-git.conf.d/" ]; then
for file in $(/bin/ls --color=never -w 1 "$HOME/.sostools/git/sos-git.conf.d/");do for file in $($SOSGIT_LS --color=never -w 1 "$HOME/.sostools/git/sos-git.conf.d/");do
source "$HOME/.sostools/git/sos-git.conf.d/${file}" source "$HOME/.sostools/git/sos-git.conf.d/${file}"
done done
fi fi
@ -293,11 +293,11 @@ function checkFastSettings() {
} }
function chmodConfiguration() { function chmodConfiguration() {
chmod +x "$HOME/.sostools/git/sos-git.conf" &> /dev/null chmod +x "$HOME/.sostools/git/sos-git.conf" &> /dev/null
for file in $(ls --color=never -w 1 "$HOME/.sostools/git/sos-git.conf.d"); do for file in $($SOSGIT_LS --color=never -w 1 "$HOME/.sostools/git/sos-git.conf.d"); do
chmod +x "$HOME/.sostools/git/sos-git.conf.d/$file" chmod +x "$HOME/.sostools/git/sos-git.conf.d/$file"
done done
chmod +x "/etc/sostools/git/sos-git.conf" &> /dev/null chmod +x "/etc/sostools/git/sos-git.conf" &> /dev/null
for file in $(ls --color=never -w 1 "/etc/sostools/git/sos-git.conf.d"); do for file in $($SOSGIT_LS --color=never -w 1 "/etc/sostools/git/sos-git.conf.d"); do
chmod +x "/etc/sostools/git/sos-git.conf.d/$file" chmod +x "/etc/sostools/git/sos-git.conf.d/$file"
done done
} }
@ -382,11 +382,11 @@ function collectFiles() {
echo "$(pwd)" &> $SOSGIT_TMP/sosgit_collectfiles_pwd echo "$(pwd)" &> $SOSGIT_TMP/sosgit_collectfiles_pwd
cd "$1" cd "$1"
export "SOSGIT_EXITSTRING=" export "SOSGIT_EXITSTRING="
for file in $(ls --color=never -w 1 "$1"); do for file in $($SOSGIT_LS --color=never -w 1 "$1"); do
if [ "$SOSGIT_EXITSTRING" == "" ]; then if [ "$SOSGIT_EXITSTRING" == "" ]; then
export "SOSGIT_EXITSTRING=$(ls --color=never -w 1 $(pwd)/$file)" export "SOSGIT_EXITSTRING=$($SOSGIT_LS --color=never -w 1 $(pwd)/$file)"
else else
export "SOSGIT_EXITSTRING= $(ls --color=never -w 1 $(pwd)/$file)" export "SOSGIT_EXITSTRING= $($SOSGIT_LS --color=never -w 1 $(pwd)/$file)"
fi fi
done done
cd "$(cat ${SOSGIT_TMP}/sosgit_collectfiles_pwd)" cd "$(cat ${SOSGIT_TMP}/sosgit_collectfiles_pwd)"