mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 02:47:56 +01:00
20 lines
No EOL
486 B
Cheetah
20 lines
No EOL
486 B
Cheetah
<%page args="version"/>
|
|
|
|
<%
|
|
import os
|
|
def list_files(directory):
|
|
try:
|
|
files = os.listdir(directory)
|
|
return files
|
|
except OSError as e:
|
|
return [f"Error: {e}"] # Return error message as a list
|
|
|
|
directory_to_list = "scripts/post"
|
|
file_list = list_files(directory_to_list)
|
|
%>
|
|
|
|
% if int(version) >= 42:
|
|
% for file_name in file_list:
|
|
append usr/share/anaconda/interactive-defaults.ks "%include /usr/share/anaconda/post-scripts/${file_name}.ks"
|
|
% endfor
|
|
% endif |