mirror of
https://github.com/superconvert/smart-os.git
synced 2024-11-22 18:20:30 +08:00
31 lines
623 B
Bash
31 lines
623 B
Bash
|
# 处理器
|
||
|
core_num=`nproc`
|
||
|
|
||
|
# 是否开启 gcc
|
||
|
with_gcc=false
|
||
|
|
||
|
# 编译工程目录
|
||
|
build_dir=`pwd`"/build"
|
||
|
|
||
|
# 公共目录
|
||
|
linux_install=${build_dir}"/linux_install"
|
||
|
glibc_install=${build_dir}"/glibc_install"
|
||
|
busybox_install=${build_dir}"/busybox_install"
|
||
|
gcc_install=${build_dir}"/gcc_install"
|
||
|
binutils_install=${build_dir}"/binutils_install"
|
||
|
|
||
|
# 从完整路径获取文件名
|
||
|
file_name() {
|
||
|
filename=$(echo $1 | rev | awk -v FS='/' '{print $1}' | rev)
|
||
|
echo ${filename}
|
||
|
}
|
||
|
|
||
|
# 获取去掉扩展名的文件名
|
||
|
file_dirname() {
|
||
|
filename=$(file_name $1)
|
||
|
filedir=`echo $filename | sed "s/$2//g"`
|
||
|
echo $filedir
|
||
|
}
|
||
|
|
||
|
|