Skip to content

Commit

Permalink
make the bash subst more like original
Browse files Browse the repository at this point in the history
  • Loading branch information
bsherman committed Oct 22, 2024
1 parent d9fabeb commit 9e06d7b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Containerfile.common
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN set -e; \
kernel_version=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" kernel-core | head -n 1); \
for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \
basename=$(basename ${rpm}); \
name=${basename/-${kernel_version}*/}; \
name=${basename%%-${kernel_version}*}; \
if [[ "$basename" == *"$kernel_version"* ]]; then \
fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \
else \
Expand Down
2 changes: 1 addition & 1 deletion Containerfile.extra
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN set -e; \
kernel_version=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" kernel-core | head -n 1); \
for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \
basename=$(basename ${rpm}); \
name=${basename/-${kernel_version}*/}; \
name=${basename%%-${kernel_version}*}; \
if [[ "$basename" == *"$kernel_version"* ]]; then \
fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \
else \
Expand Down
2 changes: 1 addition & 1 deletion Containerfile.nvidia
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ RUN set -e; \
kernel_version=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" kernel-core | head -n 1); \
for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \
basename=$(basename ${rpm}); \
name=${basename/-${kernel_version}*/}; \
name=${basename%%-${kernel_version}*}; \
if [[ "$basename" == *"$kernel_version"* ]]; then \
fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \
else \
Expand Down
2 changes: 1 addition & 1 deletion Containerfile.nvidia-open
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ RUN set -e; \
kernel_version=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" kernel-core | head -n 1); \
for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \
basename=$(basename ${rpm}); \
name=${basename/-${kernel_version}*/}; \
name=${basename%%-${kernel_version}*}; \
if [[ "$basename" == *"$kernel_version"* ]]; then \
fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \
else \
Expand Down
2 changes: 1 addition & 1 deletion Containerfile.zfs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RUN set -e; \
kernel_version=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" kernel-core | head -n 1); \
for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \
basename=$(basename ${rpm}); \
name=${basename/-${kernel_version}*/}; \
name=${basename%%-${kernel_version}*}; \
if [[ "$basename" == *"$kernel_version"* ]]; then \
fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \
else \
Expand Down

0 comments on commit 9e06d7b

Please sign in to comment.