CBEBMHUSOH3BUSNKD2372DXTAZQBF5UPZCOYFSBPDX5J5QV5PMXQC
TL7YNDX4E2KDNU4QPONKD7LPGY3DEO77XMUQ75OLOH2BGEW4IBQQC
VIEK2XMYJX37ELGVE2P5PZQU47NJ3GBXPV3XY2RWG2TDHIZEV57QC
OUNA3ZMTTISFWX3HHIJ46WTYQJBX4OFSNU4SU3GOJMBLLHQDFT7AC
I3MID22EURRK26C4JZ2U5FBEZ57GZVMBT44KFKTU4BBYXKLILWRAC
A4OT5TVSFIEVJU4FSBJKTJH6MN2LOVEAS6Y7JCA4DMFGYKCVKTDQC
LJDWCB3JTDL5XVZ5UGFQXL6H2G3HXECQZQO44FGOJH3RKQ5QYJQAC
7SNXCC5KSDXU3MBJT2FBEPAISWPY62DHPC2RLEYXC2WVTWX5TKKQC
JDZASPALXSFZOL3MXCKBPX74CUD3W743ZJ6W2422FIJ7NJOD67ZAC
(defun make-safe-shell-command argv
(let ((problem false))
(label ((shellquote-string
(lambda (x)
(cond ((stringp x) (shellquote x))
((eq x :pipe) "|")
((eq x :gt) ">")
((eq x :gtgt) ">>")
((eq x :lt) "<")
((keywordp x) (keyword-name x)) ; unquoted!
(true (setq problem true))))))
(let ((words (mapcar shellquote-string argv)))
(cond
(problem (abort "make-safe-shell-command: could not with argv %s"
(repr argv)))
(true (apply string-join " " words)))))))
(label ((shellquote-string
(lambda (x) (cond ((stringp x) (shellquote x))
((symbolp x) (sprintf "%s" x))))))
(let* ((words (mapcar shellquote-string argv))
(command (apply string-join " " words)))
(cond (*show-system-command*
(*show-system-command* command)))
(unsafe-system command))))
(let ((safe-command (apply make-safe-shell-command argv)))
(cond (*show-system-command*
(*show-system-command* safe-command)))
(unsafe-system safe-command)))