!/bin/bash
# install PLINK 1.90 beta
#https://www.cog-genomics.org/plink/
src=https://s3.amazonaws.com/plink1-assets/plink_linux_x86_64_20210606.zip
target=/opt/PLINK190b
[ $(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};done;
沒有留言:
張貼留言