diff options
author | CoprDistGit <infra@openeuler.org> | 2024-12-26 08:38:26 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-12-26 08:38:26 +0000 |
commit | 564a47026d75b43add4a4375fefc89ae2dc97cef (patch) | |
tree | ac809dc1efbf42b07bb89d6364d8227721159e29 | |
parent | 9912e053c188e4782d825858a1196c7e7aac1a7c (diff) |
automatic import of Document_Classification
-rw-r--r-- | Document_Classification.spec | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/Document_Classification.spec b/Document_Classification.spec index bba6d1d..b216154 100644 --- a/Document_Classification.spec +++ b/Document_Classification.spec @@ -29,28 +29,9 @@ It includes [文件分类,将一个路径下的文件夹和子文件夹遍历 echo "开始进入%prep阶段..."
# 输出当前所在的工作目录,用于确认是否是期望的目录
echo "当前工作目录:$(pwd)"
-# 检查构建所需的源文件是否存在,如果不存在则输出提示信息并终止构建
-if [ ! -f "/builddir/build/SOURCES/Document_Classification-1.0.0.tar.gz" ]; then
- echo "未找到源文件Document_Classification-1.0.0.tar.gz,构建将会失败。"
- exit 1
-fi
-# 输出源文件的详细信息(权限等情况)
-ls -l "/builddir/build/SOURCES/Document_Classification-1.0.0.tar.gz"
-# 注释掉%autosetup,改为手动进行解压操作
-#%autosetup
-# 使用tar命令解压源文件,并通过判断命令返回值来进行错误处理
-tar -xzf "/builddir/build/SOURCES/Document_Classification-1.0.0.tar.gz"
-if [ $? -ne 0 ]; then
- echo "解压源文件失败,构建将会失败。"
- exit 1
-fi
-# 检查解压后是否成功进入对应的源文件目录,如果没有则输出提示信息并可能导致构建失败
-# 修正basename命令,去除多余的.tar.gz
-if [ ! -d "$(basename /builddir/build/SOURCES/Document_Classification-1.0.0.tar.gz .tar.gz)" ]; then
- echo "解压后未能进入对应的源文件目录,构建可能会失败。"
- exit 1
-fi
-# 输出已进入的源文件目录信息
+
+%autosetup
+
echo "已进入的源文件目录:$(pwd)"
|