#!/bin/bash echo Downloading latest release from GitHub... wget -qO- https://api.github.com/repos/Mrs4s/go-cqhttp/releases | grep "browser" | grep v1 | \ grep linux_amd64.tar.gz | cut -d'"' -f4 | sort -r | head -n1 | wget -i- -qO- | tar -xz echo Installing dependencies from NPM... LIBVIPS_REPO="https://mikeslab.dix.asia/gogs/Pirami/sharp-libvips-mozjpeg/raw" npm_config_sharp_libvips_binary_host="$LIBVIPS_REPO" npm install echo $'\cc' | ./go-cqhttp > /dev/null 2>&1 gawk -i inplace \ '/^[^ ]+:/{s=match($0,/servers:/)?1:0} /- http:/{if(s==1) h=1} /- ws:/{if(s==1) ws=1} \ /disabled:/{if(h==1){gsub("false","true"); h=0} if(ws==1){gsub("true","false"); ws=0}} \ {print}' ./config.yml read -p 'QQ: ' QQ && read -sp 'Pass: ' PSW && sed -i'' \ 's/\(uin: \)[0-9]*\(.*\)/\1'"$QQ"'\2/; s/\(password: \)'"''"'\(.*\)/\1'"'$PSW'"'\2/' \ config.yml && unset QQ PSW && chmod 600 config.yml; echo echo Done!