
Raymond Toy pushed to branch issue-386-generate-def-unix-error at cmucl / cmucl Commits: a354f30f by Raymond Toy at 2025-03-02T08:47:29-08:00 Run shellcheck and apply (most) suggestions Applied suggestions from shellcheck, but we still have the warning SC2125. We want shell globbing to occur - - - - - 1 changed file: - bin/create-errno.sh Changes: ===================================== bin/create-errno.sh ===================================== @@ -40,7 +40,7 @@ TEMPLATE="bin/errno-template.lisp" # Set ERRNO_FILES to the files where we can find errno definitions. if [ -z "$DEFAULT" ]; then - case `uname -s` in + case $(uname -s) in Linux) ERRNO_FILES=/usr/include/asm-generic/errno*.h ;; Darwin) ERRNO_FILES=/usr/include/sys/errno.h @@ -58,20 +58,22 @@ else # We can autogenerate the def-unix-error forms. Copy just the # initial part of the template, up to the first def-unix-error # form. - sed '/^(def-unix-error ESUCCESS/q' "$TEMPLATE" > $OUTPUT - cat >> $OUTPUT <<EOF + { + sed '/^(def-unix-error ESUCCESS/q' "$TEMPLATE" + cat <<EOF ;; Autogenerated def-unix-error forms EOF - - # Create appropriate DEF-UNIX-ERROR forms by reading header files - # containing the C definitions. + + # Create appropriate DEF-UNIX-ERROR forms by reading header files + # containing the C definitions. - awk -f bin/create-def-unix-error.awk ${ERRNO_FILES} >> $OUTPUT + awk -f bin/create-def-unix-error.awk ${ERRNO_FILES} - # The tail was also copied from code/unix.lisp. It's needed to tell - # Lisp about the errno values. - sed '1,/^;;; End of default/d' "$TEMPLATE" >> $OUTPUT + # The tail was also copied from code/unix.lisp. It's needed to tell + # Lisp about the errno values. + sed '1,/^;;; End of default/d' "$TEMPLATE" + } > $OUTPUT fi # If -S option given, cat the output file to stdout View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/a354f30f572d025b1cc7b715... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/a354f30f572d025b1cc7b715... You're receiving this email because of your account on gitlab.common-lisp.net.