xref: /freebsd/crypto/openssh/.github/install_putty.sh (revision 644b4646c7acab87dc20d4e5dd53d2d9da152989)
1*644b4646SEd Maste#!/bin/sh
2*644b4646SEd Maste
3*644b4646SEd Mastever="$1"
4*644b4646SEd Maste
5*644b4646SEd Masteecho
6*644b4646SEd Masteecho --------------------------------------
7*644b4646SEd Masteecho Installing PuTTY version ${ver}
8*644b4646SEd Masteecho --------------------------------------
9*644b4646SEd Maste
10*644b4646SEd Mastecd /tmp
11*644b4646SEd Maste
12*644b4646SEd Mastecase "${ver}" in
13*644b4646SEd Mastesnapshot)
14*644b4646SEd Maste	tarball=putty.tar.gz
15*644b4646SEd Maste	url=https://tartarus.org/~simon/putty-snapshots/${tarball}
16*644b4646SEd Maste	;;
17*644b4646SEd Maste*)
18*644b4646SEd Maste	tarball=putty-${ver}.tar.gz
19*644b4646SEd Maste	url=https://the.earth.li/~sgtatham/putty/${ver}/${tarball}
20*644b4646SEd Maste	;;
21*644b4646SEd Masteesac
22*644b4646SEd Maste
23*644b4646SEd Masteif [ ! -f ${tarball} ]; then
24*644b4646SEd Maste	wget -q ${url}
25*644b4646SEd Mastefi
26*644b4646SEd Maste
27*644b4646SEd Mastemkdir -p /tmp/puttybuild
28*644b4646SEd Mastecd /tmp/puttybuild
29*644b4646SEd Maste
30*644b4646SEd Mastetar xfz /tmp/${tarball} && cd putty-*
31*644b4646SEd Masteif [ -f CMakeLists.txt ]; then
32*644b4646SEd Maste	cmake . && cmake --build . -j4 && sudo cmake --build . --target install
33*644b4646SEd Masteelse
34*644b4646SEd Maste	./configure && make -j4 && sudo make install
35*644b4646SEd Mastefi
36*644b4646SEd Mastesudo rm -rf /tmp/puttybuild
37*644b4646SEd Maste/usr/local/bin/plink -V
38