aboutsummaryrefslogtreecommitdiff
path: root/repo
diff options
context:
space:
mode:
authorIbrahim Mkusa <ibrahimmkusa@gmail.com>2024-08-10 19:18:00 -0400
committerIbrahim Mkusa <ibrahimmkusa@gmail.com>2024-08-10 19:18:00 -0400
commitcdfd73bc8014c2b33186358db09a6cb8164e31b8 (patch)
tree27affba3da6252c3776b5ee66137d5388f504d87 /repo
parent845965a1206e8b628f12d983a39386d93b33e212 (diff)
Make package manager aware of new local repos
Diffstat (limited to 'repo')
-rw-r--r--repo/add_repo_from_iso.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/repo/add_repo_from_iso.sh b/repo/add_repo_from_iso.sh
index de3d554..d1b9625 100644
--- a/repo/add_repo_from_iso.sh
+++ b/repo/add_repo_from_iso.sh
@@ -5,7 +5,7 @@
# file system
# copy it to a local location
if="/dev/sr0"
-of="/ubuntu22.iso" # contents are in iso9660 filesystem. Need to be mounted later
+of="/fedora.iso" # contents are in iso9660 filesystem. Need to be mounted later
repo_location="/repo" # location mounted on the filesystem
sudo mkdir $repo_location
sudo dd if=$if of=$of bs=1M status='progress'
@@ -19,3 +19,19 @@ EOF
# verify /etc/stab changes and mount everything
sudo mount -a
ls $repo_location
+
+# Assumes a fedora family OS but similar changes can be made in debian family
+# Makes dnf aware of newly available repos
+sudo cat > /etc/yum.repos.d/base.repo <<EOF
+[BaseOS]
+name=BaseOS
+baseurl=file://$repo_location/BaseOS
+gpgcheck=0
+EOF
+
+sudo cat > /etc/yum.repos.d/appstream.repo <<EOF
+[AppStream]
+name=AppStream
+baseurl=file://$repo_location/AppStream
+gpgcheck=0
+EOF