On Mon, Apr 26, 2021 at 04:08:30PM +0800, Wang Yong wrote:
add function for rpmbuild-pkg and install-rpm
Signed-off-by: Wang Yong wangyong0117@qq.com
lib/rpm.sh | 20 ++++++++++++++++++++ tests/install-rpm | 22 +--------------------- tests/rpmbuild-pkg | 6 ++++++ 3 files changed, 27 insertions(+), 21 deletions(-) create mode 100755 lib/rpm.sh
diff --git a/lib/rpm.sh b/lib/rpm.sh new file mode 100755 index 000000000..4c4cbc078 --- /dev/null +++ b/lib/rpm.sh @@ -0,0 +1,20 @@ +#!/bin/bash
+add_repo() +{
- custom_repo_name=($custom_repo_name)
- custom_repo_addr=($custom_repo_addr)
- for i in ${!custom_repo_name[@]}
- do
cat <<-EOF >> /etc/yum.repos.d/"${custom_repo_name[$i]}.repo"
[${custom_repo_name[$i]}]
name=${custom_repo_name[$i]}
baseurl=${custom_repo_addr[$i]}
enabled=1
gpgcheck=0
priority=100
EOF
+done
:) aligned "done".
-------- Thanks, Xijian