1 Star 0 Fork 0

Wangtake/scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
symlink-tree.sh 707 Bytes
一键复制 编辑 原始数据 按行查看 历史
henrisk 提交于 2016-08-18 14:56 . r16 tina linux v2.1 release
#!/usr/bin/env bash
# Create a new openwrt tree with symlinks pointing at the current tree
# Usage: ./scripts/symlink-tree.sh <destination>
FILES="
BSDmakefile
Config.in
LICENSE
Makefile
README
dl
docs
feeds.conf.default
include
package
rules.mk
scripts
target
toolchain
tools"
if [ -f feeds.conf ] ; then
FILES="$FILES feeds.conf"
fi
if [ -z "$1" ]; then
echo "Syntax: $0 <destination>" >&2
exit 1
fi
if [ -e "$1" ]; then
echo "Error: $1 already exists" >&2
exit 1
fi
set -e # fail if any commands fails
mkdir -p dl "$1"
for file in $FILES; do
[ -e "$PWD/$file" ] || {
echo "ERROR: $file does not exist in the current tree" >&2
exit 1
}
ln -s "$PWD/$file" "$1/"
done
exit 0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangtake/scripts.git
git@gitee.com:wangtake/scripts.git
wangtake
scripts
scripts
r16-v2.1.y

搜索帮助