22 lines
599 B
Mathematica
22 lines
599 B
Mathematica
VWHSH8 ;;GpZ; - ; IMPROVED HASHING UTILITY: INSTALL MODULE, GT.M; 01/08/2010
|
|
V ;;8.0;KERNEL;;Jul 10, 1995
|
|
;
|
|
QUIT
|
|
;
|
|
INIT() S MUMPS=^%ZOSF("OS"),OS=$$GTM("uname -o")
|
|
S PATH=$P($P($$GTM("whereis gpg")," ",2),"gpg")
|
|
S X=$TR("host:"_MUMPS_OS_":","^ ","-")
|
|
O "PIPE":(COMM="gpg --version|grep -E ^Hash:":READONLY)::"PIPE"
|
|
U "PIPE" R HASHLIST
|
|
C "PIPE" U 0
|
|
S HASHLIST=$TR($P(HASHLIST,"Hash:",2),",")
|
|
S HASHLIST=HASHLIST_" ||"_PATH_"||"_MUMPS_OS_"||"
|
|
QUIT HASHLIST
|
|
;
|
|
GTM(PIPE) ;
|
|
N (PIPE)
|
|
OPEN "PIPE":(command=PIPE)::"pipe"
|
|
S X="" F I=1:1:4 U "PIPE" R XX Q:$ZEOF S X=X_XX
|
|
CLOSE "PIPE"
|
|
QUIT X
|