2021年5月30日 星期日

PLINK107 安裝

 !/bin/bash

# install PLINK 1.07
# https://zzz.bwh.harvard.edu/plink/download.shtml

src=https://zzz.bwh.harvard.edu/plink/dist/plink-1.07-x86_64.zip
target=/opt/PLINK107

[ $(which busybox) ]&& { for i in wget unzip;do [ -f "/usr/local/bin/${i}" ] || ln -s $(which busybox) /usr/local/bin/${i}; done; };

for i in unzip wget;do [ $(which ${i}) ]&& : || { echo check ${i}: not found ${i}! &&exit 1; } ;done;

[ -d "$target" ]&&mv ${target} ${target}.$(date +%Y-%m-%d-%H-%M);

mkdir -p $target;cd $target;

echo $target >readme.txt;echo $src >>readme.txt

wget -q -O- $src | unzip -;

chmod a+x plink;cd -;

for i in plink;do [ -f "/usr/local/bin/${i}" ]&&mv /usr/local/bin/${i} /usr/local/bin/${i}.$(date +%Y-%m-%d-%H-%M); ln -s ${target}/${i} /usr/local/bin/${i}07;done;


沒有留言: