Improve registering collection message - dossier - console collection manager DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit fbd1180176b4ed7c6c80c09f3fbda7f54e6aa86c DIR parent 63b6336caa8dab28e9ade4d6fc128ed9512c2be4 HTML Author: Solene Rapenne <solene@perso.pw> Date: Mon, 1 Oct 2018 18:37:01 +0200 Improve registering collection message Diffstat: M dossier | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- DIR diff --git a/dossier b/dossier @@ -291,12 +291,13 @@ collections() { register() { if [ -d "$1" ] then - if ! expr "$1" : '^/' + if ! expr "$1" : '^/' >/dev/null then printf 'Aborting, the path of the collection must be an absolute path. %s is not valid\n' "$1" fi test -L "${REPOSITORY}/${2}" && rm "${REPOSITORY}/${2}" ln -s "$1" "${REPOSITORY}/${2}" + printf "%s registered. Use it as default with\n\t%s collections %s\n" "$2" "$0" "$2" exit 0 else printf 'Aborting, %s is not a directory\n' "$2"