Created
January 8, 2025 10:59
-
-
Save nutrino/74bb7fbe1ef9a7d864a8c1876a3115d5 to your computer and use it in GitHub Desktop.
Revisions
-
nutrino created this gist
Jan 8, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/bin/bash set -x #echo on PKG=$1 # NAME OF THE PACKAGE TO INSTALL ON OFFLINE MACHINE rm /tmp/modules-$PKG.yaml rm -rf /tmp/$PKG rm -rf /tmp/$PKG-installroot mkdir /tmp/$PKG mkdir /tmp/$PKG-installroot yum install -y --downloadonly --installroot=/tmp/$PKG-installroot --releasever=8.6 --downloaddir=/tmp/$PKG $PKG createrepo -q --database /tmp/$PKG repo2module --debug --module-name=$PKG --module-stream=stable /tmp/$PKG /tmp/modules-$PKG.yaml modifyrepo_c --mdtype=modules /tmp/modules-$PKG.yaml /tmp/$PKG/repodata rm -rf /tmp/$PKG-installroot tar -cvzf $PKG.tar.gz /tmp/$PKG