mirror of
https://gitee.com/amber-ce/amber-pm
synced 2026-03-25 23:19:49 +08:00
1.0.10
This commit is contained in:
@@ -41,6 +41,7 @@ while [ $# -gt 0 ]; do
|
|||||||
case $1 in
|
case $1 in
|
||||||
--base)
|
--base)
|
||||||
BASENAMES+=("$2")
|
BASENAMES+=("$2")
|
||||||
|
BASENAMES_ORIG+=("$2")
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--pkgname)
|
--pkgname)
|
||||||
@@ -305,8 +306,9 @@ mkdir -p "$PKG_BUILD_DIR/var/lib/apm/$NEW_PKGNAME"/{entries,files}
|
|||||||
# 创建info文件 - 写入所有base,每行一个
|
# 创建info文件 - 写入所有base,每行一个
|
||||||
log.info "创建info文件,包含所有基础环境:"
|
log.info "创建info文件,包含所有基础环境:"
|
||||||
for BASENAME in "${BASENAMES[@]}"; do
|
for BASENAME in "${BASENAMES[@]}"; do
|
||||||
echo "$BASENAME" >> "$PKG_BUILD_DIR/var/lib/apm/$NEW_PKGNAME/info"
|
echo "$BASENAME_ORIG" >> "$PKG_BUILD_DIR/var/lib/apm/$NEW_PKGNAME/info"
|
||||||
log.info " 写入: $BASENAME"
|
echo "$BASENAME" >> "$PKG_BUILD_DIR/var/lib/apm/$NEW_PKGNAME/info_debug"
|
||||||
|
log.info " 写入: $BASENAME_ORIG"
|
||||||
done
|
done
|
||||||
|
|
||||||
# 创建postinst脚本
|
# 创建postinst脚本
|
||||||
@@ -372,7 +374,7 @@ Architecture: $ORIG_ARCH
|
|||||||
Maintainer: APM Converter <apm@localhost>
|
Maintainer: APM Converter <apm@localhost>
|
||||||
Depends: $DEPENDS_STR
|
Depends: $DEPENDS_STR
|
||||||
Installed-Size: $(calculate_directory_size $PKG_BUILD_DIR)
|
Installed-Size: $(calculate_directory_size $PKG_BUILD_DIR)
|
||||||
Description: APM converted package from $DEB_PATH
|
Description: APM converted package from $ORIG_PKGNAME
|
||||||
This package was automatically converted from the original deb package.
|
This package was automatically converted from the original deb package.
|
||||||
Based on: ${BASENAMES[*]}
|
Based on: ${BASENAMES[*]}
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
VERSION=1.0.9
|
VERSION=1.0.10
|
||||||
# 获取脚本名称用于帮助信息
|
# 获取脚本名称用于帮助信息
|
||||||
SCRIPT_NAME=$(basename "$0")
|
SCRIPT_NAME=$(basename "$0")
|
||||||
PATH_PREFIX=/var/lib/apm/apm/files/ace-env/
|
PATH_PREFIX=/var/lib/apm/apm/files/ace-env/
|
||||||
@@ -48,7 +48,7 @@ apm_exec(){
|
|||||||
while : ; do
|
while : ; do
|
||||||
# 构建info文件的路径
|
# 构建info文件的路径
|
||||||
next_info_file="${current_dir}/info"
|
next_info_file="${current_dir}/info"
|
||||||
|
echo "${current_dir}/info"
|
||||||
# 检查info文件是否存在
|
# 检查info文件是否存在
|
||||||
if [[ ! -f "$next_info_file" ]]; then
|
if [[ ! -f "$next_info_file" ]]; then
|
||||||
log.debug "No more info files found, stopping recursion."
|
log.debug "No more info files found, stopping recursion."
|
||||||
@@ -72,12 +72,12 @@ apm_exec(){
|
|||||||
|
|
||||||
# 尝试获取下一个依赖信息的路径
|
# 尝试获取下一个依赖信息的路径
|
||||||
local next_basedir=$(tail -n 1 "$next_info_file")
|
local next_basedir=$(tail -n 1 "$next_info_file")
|
||||||
if [[ -z "$next_basedir" || ! -d "${PATH_PREFIX}/var/lib/apm/${next_basedir}/files" ]]; then
|
if [[ -z "$next_basedir" || ! -d "${PATH_PREFIX}/var/lib/apm/${next_basedir}" ]]; then
|
||||||
log.debug "No further dependencies found, ending recursion."
|
log.debug "No further dependencies found, ending recursion."
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
# 更新当前目录,递归处理下一个依赖
|
# 更新当前目录,递归处理下一个依赖
|
||||||
current_dir="${PATH_PREFIX}/var/lib/apm/${next_basedir}/files"
|
current_dir="${PATH_PREFIX}/var/lib/apm/${next_basedir}"
|
||||||
done
|
done
|
||||||
|
|
||||||
# 检查是否找到了有效的lowerdir
|
# 检查是否找到了有效的lowerdir
|
||||||
@@ -88,7 +88,6 @@ apm_exec(){
|
|||||||
|
|
||||||
# 将lowerdirs数组用冒号连接起来
|
# 将lowerdirs数组用冒号连接起来
|
||||||
local lowerdir=$(IFS=:; echo "${lowerdirs[*]}")
|
local lowerdir=$(IFS=:; echo "${lowerdirs[*]}")
|
||||||
|
|
||||||
# 创建挂载点目录
|
# 创建挂载点目录
|
||||||
mkdir -p "/tmp/apm/${coredir}"
|
mkdir -p "/tmp/apm/${coredir}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user