build: support build on garudalinux
This commit is contained in:
14
deps/init/dep_create.sh
vendored
14
deps/init/dep_create.sh
vendored
@ -80,7 +80,7 @@ function get_os_release() {
|
|||||||
uos)
|
uos)
|
||||||
version_ge "20" && compat_centos7 && return
|
version_ge "20" && compat_centos7 && return
|
||||||
;;
|
;;
|
||||||
arch)
|
arch | garuda)
|
||||||
compat_centos8 && return
|
compat_centos8 && return
|
||||||
;;
|
;;
|
||||||
rocky)
|
rocky)
|
||||||
@ -108,7 +108,7 @@ function get_os_release() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
not_supported && return 1
|
not_supported && return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
get_os_release || exit 1
|
get_os_release || exit 1
|
||||||
@ -136,7 +136,7 @@ if [ -f ${WORKSAPCE_DEPS_3RD_MD5} ]; then
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo_log "${DEP_FILE} has been not initialized, due to ${WORKSAPCE_DEPS_3RD_MD5} not exists"
|
echo_log "${DEP_FILE} has been not initialized, due to ${WORKSAPCE_DEPS_3RD_MD5} not exists"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 依赖目录不存在,停止缓存
|
# 依赖目录不存在,停止缓存
|
||||||
if [ "x${DEP_CACHE_DIR}" == "x" ]; then
|
if [ "x${DEP_CACHE_DIR}" == "x" ]; then
|
||||||
@ -200,7 +200,7 @@ section="default"
|
|||||||
content=""
|
content=""
|
||||||
|
|
||||||
function save_content {
|
function save_content {
|
||||||
if [[ "$content" != "" ]]
|
if [[ "$content" != "" ]]
|
||||||
then
|
then
|
||||||
if [[ $(echo "$section" | grep -E "^target\-") != "" ]]
|
if [[ $(echo "$section" | grep -E "^target\-") != "" ]]
|
||||||
then
|
then
|
||||||
@ -225,7 +225,7 @@ do
|
|||||||
else
|
else
|
||||||
[[ "$line" != "" ]] && [[ "$line" != '#'* ]] && content+=$'\n'"$line"
|
[[ "$line" != "" ]] && [[ "$line" != '#'* ]] && content+=$'\n'"$line"
|
||||||
fi
|
fi
|
||||||
done < $DEP_FILE
|
done < $DEP_FILE
|
||||||
save_content
|
save_content
|
||||||
|
|
||||||
# 真正开始下载
|
# 真正开始下载
|
||||||
@ -259,7 +259,7 @@ do
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo_log "unpack package <${pkg}>... \c"
|
echo_log "unpack package <${pkg}>... \c"
|
||||||
if [ "$ID" = "arch" ]; then
|
if [[ "$ID" = "arch" || "$ID" = "garuda" ]]; then
|
||||||
(cd ${TARGET_DIR_3RD} && rpmextract.sh "${TARGET_DIR_3RD}/pkg/${pkg}")
|
(cd ${TARGET_DIR_3RD} && rpmextract.sh "${TARGET_DIR_3RD}/pkg/${pkg}")
|
||||||
else
|
else
|
||||||
(cd ${TARGET_DIR_3RD} && rpm2cpio "${TARGET_DIR_3RD}/pkg/${pkg}" | cpio -di -u --quiet)
|
(cd ${TARGET_DIR_3RD} && rpm2cpio "${TARGET_DIR_3RD}/pkg/${pkg}" | cpio -di -u --quiet)
|
||||||
@ -313,7 +313,7 @@ if [ -f ${CACHE_DEPS_LOCKFILE} ];then
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo_log "lock file ${CACHE_DEPS_LOCKFILE} in 1 mins"
|
echo_log "lock file ${CACHE_DEPS_LOCKFILE} in 1 mins"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${LINK_CHACE_DIRECT} == "ON" ]; then
|
if [ ${LINK_CHACE_DIRECT} == "ON" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user