@@ -6,7 +6,7 @@ const IMAGING_JSON_URL =
66 "https://downloads.raspberrypi.org/os_list_imagingutility_v4.json" ;
77
88const hclPath = fileURLToPath (
9- new URL ( "../companionpi.pkr.hcl" , import . meta. url )
9+ new URL ( "../companionpi.pkr.hcl" , import . meta. url ) ,
1010) ;
1111
1212function normalizeChecksum ( raw ) {
@@ -90,18 +90,18 @@ function replaceHclValues(hclStr, newUrl, newChecksum) {
9090 return out ;
9191}
9292
93- // Usage: node tools/update_raspbian_image .mjs [--dry-run|-n] [--help]
93+ // Usage: node tools/update_rpi_os_image .mjs [--dry-run|-n] [--help]
9494//
9595// Fetches the Raspberry Pi imaging utility JSON and updates
9696// `companionpi.pkr.hcl` `iso_url` and `iso_checksum` fields.
9797// Use --dry-run to preview changes before writing.
9898
9999if ( process . argv . includes ( "--help" ) || process . argv . includes ( "-h" ) ) {
100100 console . log (
101- "Usage: node tools/update_raspbian_image .mjs [--dry-run|-n] [--help]"
101+ "Usage: node tools/update_rpi_os_image .mjs [--dry-run|-n] [--help]" ,
102102 ) ;
103103 console . log (
104- "Fetch imaging JSON and update companionpi.pkr.hcl with latest raspios_lite_arm64 image and checksum."
104+ "Fetch imaging JSON and update companionpi.pkr.hcl with latest raspios_lite_arm64 image and checksum." ,
105105 ) ;
106106 process . exit ( 0 ) ;
107107}
@@ -120,7 +120,7 @@ console.log(`Found ${apiImagesList.length} items in imaging list`);
120120const chosenImage = await findImage ( apiImagesList ) ;
121121if ( ! chosenImage )
122122 throw new Error (
123- "No suitable raspios_lite_arm64 candidates found in imaging JSON"
123+ "No suitable raspios_lite_arm64 candidates found in imaging JSON" ,
124124 ) ;
125125
126126console . log ( "Found image:" , chosenImage . url , chosenImage . sha ) ;
0 commit comments