代码拉取完成,页面将自动刷新
#!/bin/bash
if [ $# -ne 1 ]; then
echo -e "Usage:"
echo -e " $ ./merge_snippets.sh new_hosts\n"
exit 1
fi
new_hosts_file=$1
if [ -f $new_hosts_file ]; then
new_hosts_file=${new_hosts_file}".new"
printf "" > $new_hosts_file
fi
printf "\
## __ __ \r\n\
## |__| _____ __ __ ┌─────┐ | | __ \r\n\
## | || || | || ──| ______ | |──┐┌─────┐.─────.| |_ .─────.\r\n\
## | || ─ || | || ─ | |______| | || ─ ||__ ──|| _||__ ──|\r\n\
## |__|| ┌──┘ \___/ |_____| |__|__||_____||_____||____||_____|\r\n\
## |__| \r\n\
## · lennylxx ·\r\n\
##\r\n\
## +------------------------- >>d(' _ ')b<< -------------------------+\r\n\
## | |\r\n\
## | Project: https://github.com/lennylxx/ipv6-hosts |\r\n\
## | Update : `date +"%a, %d %b %Y %T %z"` |\r\n\
## | |\r\n\
## +-------------------------------------------------------------------+\r\n\
" >> $new_hosts_file
printf "\r\n::1 localhost\r\n\r\n" >> $new_hosts_file
cat snippets/??_*.txt >> $new_hosts_file
printf "\
## +-------------------------------------------------------------------+\r\n\
## | End of File |\r\n\
## +-------------------------------------------------------------------+\r\n\
" >> $new_hosts_file
exit 0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。