Determine type: Redirect stderr for ls
This commit is contained in:
parent
03d9b6a251
commit
218d7a6523
|
@ -99,7 +99,7 @@ fi
|
||||||
IFS="%"
|
IFS="%"
|
||||||
for game_path in ${games_list}; do
|
for game_path in ${games_list}; do
|
||||||
local_game_path="${HOME}/${game_path}"
|
local_game_path="${HOME}/${game_path}"
|
||||||
local_game_path_type="$(ls -ld "${local_game_path}" | sed 's/\(^.\).*/\1/')"
|
local_game_path_type="$(ls -ld -- "${local_game_path}" 2> /dev/null | sed 's/\(^.\).*/\1/')"
|
||||||
|
|
||||||
game_name="$(basename "${game_path}")"
|
game_name="$(basename "${game_path}")"
|
||||||
game_dir="$(dirname "${game_path}")"
|
game_dir="$(dirname "${game_path}")"
|
||||||
|
@ -125,7 +125,6 @@ for game_path in ${games_list}; do
|
||||||
symlink_game_dir "${game_name}" "${game_dir}"
|
symlink_game_dir "${game_name}" "${game_dir}"
|
||||||
### If the symlink failed
|
### If the symlink failed
|
||||||
if [ "${?}" != 0 ]; then
|
if [ "${?}" != 0 ]; then
|
||||||
echo $?
|
|
||||||
printf '\e[1;35m%-6s\e[m\n' "Data of ${game_path} (Homedir) − ${local_game_path} are not managed. Type: ${local_game_path_type}. Abort"
|
printf '\e[1;35m%-6s\e[m\n' "Data of ${game_path} (Homedir) − ${local_game_path} are not managed. Type: ${local_game_path_type}. Abort"
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue