diff options
author | Georg Pfuetzenreuter | 2022-05-31 13:49:30 +0200 |
---|---|---|
committer | Georg Pfuetzenreuter | 2022-05-31 13:49:30 +0200 |
commit | 60543a38e5d99265d663581ff157103e7ac133f6 (patch) | |
tree | 038b07c616e7d1619c2996379ce2451b8d328bac /scripts | |
parent | 425bd3961a68723eb126693ee65510b5df1ea785 (diff) | |
download | system-60543a38e5d99265d663581ff157103e7ac133f6.tar.gz system-60543a38e5d99265d663581ff157103e7ac133f6.tar.bz2 system-60543a38e5d99265d663581ff157103e7ac133f6.zip |
Init OpenBSD Python bootstrap script
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/sh/python_openbsd.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/scripts/sh/python_openbsd.sh b/scripts/sh/python_openbsd.sh new file mode 100755 index 0000000..bba587a --- /dev/null +++ b/scripts/sh/python_openbsd.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# Boostrap Python 3.10 on OpenBSD 7.1 +# Run on management host + +target="$1" +share="/mnt/storage-warsaw/shared/openbsd/python/" +tempdir="/tmp" +packages="bzip2-1.0.8p0.tgz libffi-3.3p1.tgz xz-5.2.5p0.tgz sqlite3-3.38.2.tgz libiconv-1.16p0.tgz gettext-runtime-0.21p1.tgz python-3.10.4p0.tgz" + +install () { + local package="$tempdir/$1" + ssh -t "$target" "doas pkg_install $package" +} + +if [ -d "$share" ]; +then + echo "Is the deployment share not mounted?" + exit 1 +fi + +if [ -z "$target" ]; +then + echo "Specify a target host you have access to." + exit 1 +fi + +if [ ! "ssh -q $target hostname" ]; +then + echo "Unable to connect to host, aborting." + exit 1 +fi + +scp -C "$share/*.tgz" "$target:$tempdir/" + +for package in "$packages"; +do + install "$package" +done |