(List (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS errexit]} ) (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS nounset]} ) (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS pipefail]} ) (FunctionDef check_for_ppa [] (List (= scope= flags=0 words=[] bindings=[('repo', {[DQ [VarSub 1]]})]) (Com {[LIT_CHARS grep]} {[LIT_CHARS -qsw]} {[VarSub repo]} {[LIT_CHARS /etc/apt/sources.list]} {[LIT_CHARS /etc/apt/sources.list.d/] [LIT_OTHER "*"]} ) ) ) (FunctionDef package_status [] (List (= scope= flags=0 words=[] bindings=[('pkgname', {[VarSub 1]})]) (= scope= flags=0 words=[{[LIT_CHARS pkgstatus]}] bindings=[]) (= scope= flags=0 words=[] bindings=[('pkgstatus', {[ComSub (Com {[LIT_CHARS dpkg-query]} {[LIT_CHARS -W]} {[LIT_CHARS --showformat] [LIT_DBRACKET_LIKE "="] [SQ ]} {[DQ [VarSub pkgname]]})]})]) (If (DBracket {B2 BINARY_STRING_NOT_EQUAL {[DQ [VarSub pkgstatus]]} {[DQ [LIT_CHARS "install ok installed"]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Missing package "][VarSub pkgname]]} ) (Com {[LIT_CHARS sudo]} {[LIT_CHARS apt-get]} {[LIT_CHARS --force-yes]} {[LIT_CHARS --yes]} {[LIT_CHARS install]} {[VarSub pkgname]} ) ) ) ) ) (FunctionDef gather_installation_reqs [] (List (If (Pipeline! (Com {[LIT_CHARS check_for_ppa]} {[DQ [LIT_CHARS juju]]} ) ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "... Detected missing dependencies.. running"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "... add-apt-repository ppa:juju/stable"]]} ) (Com {[LIT_CHARS sudo]} {[LIT_CHARS add-apt-repository]} {[LIT_CHARS -y]} {[LIT_CHARS ppa] [LIT_OTHER ":"] [LIT_CHARS juju/stable]} ) (Com {[LIT_CHARS sudo]} {[LIT_CHARS apt-get]} {[LIT_CHARS update]} ) ) ) (Com {[LIT_CHARS package_status]} {[SQ ]} ) (Com {[LIT_CHARS package_status]} {[SQ ]} ) ) ) )