3 Star 10 Fork 0

Gitee 极速下载 / fn-project

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/fnproject/fn
克隆/下载
licenses.sh 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
license() {
apache=$(grep -rs "Apache License, Version 2.0" vendor/$1)
if [[ ! -z $apache ]]; then
echo "$1 Apache 2.0"
return
fi
bsd_file=$(grep -lrs "Redistribution and use in source and binary forms, with or without" vendor/$1 | head -n 1)
if [[ ! -z $bsd_file ]]; then
bsd3=$(grep "this software without specific prior written permission" $bsd_file)
if [[ ! -z $bsd3 ]]; then
echo "$1 BSD 3"
else
echo "$1 BSD 2"
fi
return
fi
mit=$(grep -rs "Permission is hereby granted, free of charge" vendor/$1)
if [[ ! -z $mit ]]; then
echo "$1 MIT"
return
fi
moz=$(grep -rs "Mozilla Public License" vendor/$1)
if [[ ! -z $moz ]]; then
echo "$1 Mozilla Public License 2.0"
return
fi
isc=$(grep -rs "Permission to use, copy, modify, and distribute this software for any" vendor/$1)
if [[ ! -z $isc ]]; then
echo "$1 ISC License"
return
fi
unlicense=$(grep -rs "This is free and unencumbered software released into the public domain." vendor/$1)
if [[ ! -z $unlicense ]]; then
echo "$1 Unlicense"
return
fi
cc=$(grep -rs "creativecommons" vendor/$1)
if [[ ! -z $cc ]]; then
echo "$1 Creative Commons"
return
fi
# TODO others
echo "$1 No License Found"
}
deps=$(cat Gopkg.lock | grep -E 'name.*=.*"' | awk '{print $3}' | tr -d '"')
for dep in $deps; do
license $dep
done
Go
1
https://gitee.com/mirrors/fn-project.git
git@gitee.com:mirrors/fn-project.git
mirrors
fn-project
fn-project
master

搜索帮助