build 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. #!/bin/bash
  2. [% c("var/set_default_env") -%]
  3. distdir=/var/tmp/dist/[% project %]
  4. export TORBROWSER_VERSION='[% c("version") %]'
  5. mkdir -p $distdir
  6. scripts_dir=/var/tmp/build_scripts
  7. mkdir -p "$scripts_dir"
  8. OUTDIR='[% dest_dir _ "/" _ c("filename") %]'
  9. mkdir -p $OUTDIR
  10. # When we build with MULTI_LINGUAL=1, the browser will be packaged inside a
  11. # directory named tor-browser (instead of tor-browser_en-US). Therefore we
  12. # stage everything under tor-browser-stage to avoid a conflict.
  13. TB_STAGE_DIR=$distdir/tor-browser-stage
  14. GENERATEDPREFSPATH=$rootdir/Bundle-Data/PTConfigs/generated-prefs.js
  15. # Create initially empty prefs file where we can dump our conditionally included/genetered prefs
  16. touch "$GENERATEDPREFSPATH"
  17. [% IF c("var/osx") %]
  18. TBDIR="$TB_STAGE_DIR/Tor Browser.app"
  19. DOCSPATH=Contents/Resources/TorBrowser/Docs
  20. EXTSPATH=Contents/Resources/distribution/extensions
  21. TORBINPATH=Contents/MacOS/Tor
  22. TORCONFIGPATH=Contents/Resources/TorBrowser/Tor
  23. tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/libdmg') %]
  24. export PATH=/var/tmp/dist/libdmg-hfsplus:$PATH
  25. [% ELSE %]
  26. TBDIR=$TB_STAGE_DIR/Browser
  27. DOCSPATH=TorBrowser/Docs
  28. EXTSPATH=TorBrowser/Data/Browser/profile.default/extensions
  29. TORCONFIGPATH=TorBrowser/Data/Tor
  30. mkdir -p "$TBDIR/TorBrowser/Data/Browser/Caches"
  31. [% END %]
  32. mkdir -p "$TBDIR/$EXTSPATH"
  33. # Extract the MAR tools.
  34. unzip -d $rootdir $rootdir/[% c('input_files_by_name/firefox') %]/mar-tools-*.zip
  35. MARTOOLS=$rootdir/mar-tools
  36. mv [% c('input_files_by_name/noscript') %] "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi"
  37. tar -C "$TBDIR" -xf [% c('input_files_by_name/obfs4') %]
  38. tar -C "$TBDIR" -xf [% c('input_files_by_name/snowflake') -%]
  39. tar -C "$TBDIR[% IF c("var/osx") %]/Contents/Resources[% END %]" -xf [% c('input_files_by_name/fonts') %]
  40. [% IF c("var/linux") %]
  41. cp RelativeLink/* ${TB_STAGE_DIR}/Browser/
  42. cp RelativeLink/start-tor-browser.desktop ${TB_STAGE_DIR}/
  43. cat > ${TB_STAGE_DIR}/Browser/start-tor-browser << 'RBM_TB_EOF'
  44. [% INCLUDE 'RelativeLink/start-tor-browser' -%]
  45. RBM_TB_EOF
  46. [% IF c("var/namecoin") %]
  47. pushd ${TB_STAGE_DIR}/Browser/
  48. patch -p1 < $rootdir/namecoin.patch
  49. popd
  50. [% END %]
  51. chmod +x ${TB_STAGE_DIR}/Browser/start-tor-browser
  52. # Make sure we get the desired scrollbar behavior with Gtk3, see bug 27546.
  53. GTK_SETTINGS_DIR=${TB_STAGE_DIR}/Browser/.config/gtk-3.0
  54. mkdir -p $GTK_SETTINGS_DIR
  55. cp $rootdir/gtk3-settings.ini $GTK_SETTINGS_DIR/settings.ini
  56. [% END %]
  57. tar -C ${TB_STAGE_DIR} -xf [% c('input_files_by_name/firefox') %]/tor-browser.tar.gz
  58. # Make unpacked HTTPS Everywhere available in resource://torbutton/content/extensions/https-everywhere/ as TB expects
  59. TMP_HTTPS_EVERYWHERE_PATH=$rootdir/tmp_https_everywhere/
  60. mkdir $TMP_HTTPS_EVERYWHERE_PATH
  61. pushd $TMP_HTTPS_EVERYWHERE_PATH
  62. mkdir -p chrome/torbutton/content/extensions/https-everywhere/
  63. unzip $rootdir/[% c('input_files_by_name/https-everywhere') %] -d chrome/torbutton/content/extensions/https-everywhere/
  64. find . -exec [% c("var/touch") %] {} \;
  65. find chrome/ | sort | zip -X -@ "$TBDIR[% IF c("var/osx") %]/Contents/Resources[% END %]/omni.ja"
  66. popd
  67. rm -rf $TMP_HTTPS_EVERYWHERE_PATH
  68. tar -C "$TBDIR[% IF ! c("var/osx") %]/TorBrowser[% END %]" -xf [% c('input_files_by_name/tor') %]/tor.tar.gz
  69. [% IF c("var/namecoin") %]
  70. # Extract Electrum-NMC
  71. tar -C "$TBDIR/TorBrowser" -xf [% c('input_files_by_name/electrum-nmc') %]
  72. # Extract ncprop279
  73. mkdir "$TBDIR/TorBrowser/ncprop279"
  74. tar -C "$TBDIR/TorBrowser/ncprop279" -xf [% c('input_files_by_name/ncprop279') %]
  75. # Extract StemNS
  76. tar -C "$TBDIR/TorBrowser" -xf [% c('input_files_by_name/stemns') %]
  77. [% END %]
  78. [% IF c("var/linux");
  79. SET bundledata_osname = 'linux';
  80. ELSIF c("var/osx");
  81. SET bundledata_osname = 'mac';
  82. ELSIF c("var/windows");
  83. SET bundledata_osname = 'windows';
  84. END; %]
  85. [% IF c("var/osx") %]
  86. # The Bundle-Data is designed for embedded data, so we need to modify
  87. # the structure when we want the data to be outside the app directory.
  88. # We also create an override.ini file to disable the profile migrator.
  89. SKELETON_TMP=$rootdir/Bundle-Data/mac-skeleton-tmp
  90. SKELETON_TMP_RESOURCES=$SKELETON_TMP/Contents/Resources
  91. mkdir -p $SKELETON_TMP_RESOURCES/browser
  92. echo "[XRE]" > $SKELETON_TMP_RESOURCES/browser/override.ini
  93. echo "EnableProfileMigrator=0" >> $SKELETON_TMP_RESOURCES/browser/override.ini
  94. mkdir -p $SKELETON_TMP_RESOURCES/TorBrowser/Tor
  95. cp -p Bundle-Data/mac/TorBrowser/Data/Tor/torrc-defaults $SKELETON_TMP_RESOURCES/TorBrowser/Tor/
  96. # Place a copy of the bookmarks.html file at the top. It will be moved into
  97. # browser/omni.ja later
  98. cp -p Bundle-Data/mac/TorBrowser/Data/Browser/profile.default/bookmarks.html $rootdir
  99. rm -Rf Bundle-Data/mac
  100. mv $SKELETON_TMP Bundle-Data/mac
  101. # Install a "tor" shim that sets the working directory. See #10030.
  102. mv "$TBDIR/$TORBINPATH/tor" "$TBDIR/$TORBINPATH/tor.real"
  103. cp Bundle-Data/mac-tor.sh "$TBDIR/$TORCONFIGPATH/tor"
  104. tar -C Bundle-Data/mac-applications.dmg -c . | tar -C $TB_STAGE_DIR -x
  105. [% END %]
  106. mkdir -p "$TBDIR/$DOCSPATH"
  107. cp -a Bundle-Data/Docs/* "$TBDIR/$DOCSPATH"
  108. tar -C Bundle-Data/[% bundledata_osname %] [% IF ! c("var/namecoin") %]--exclude=*Electrum-NMC* --exclude=*ncprop279*[% END %] -c . | tar -C "$TBDIR[% IF ! c("var/osx") %]/TorBrowser[% END %]" -x
  109. cat Bundle-Data/PTConfigs/[% bundledata_osname %]/torrc-defaults-appendix >> "$TBDIR/$TORCONFIGPATH/torrc-defaults"
  110. cat Bundle-Data/PTConfigs/bridge_prefs.js >> "$GENERATEDPREFSPATH"
  111. function bridges_conf {
  112. local pt="$1"
  113. local i=1
  114. while read -r line
  115. do
  116. echo "pref(\"extensions.torlauncher.default_bridge.$pt.$i\", \"$line\");" >> "$GENERATEDPREFSPATH"
  117. i=$((i + 1))
  118. done < "$rootdir/bridges_list.$pt.txt"
  119. }
  120. bridges_conf obfs4
  121. bridges_conf meek-azure
  122. bridges_conf snowflake
  123. [% IF ! c("var/multi_lingual") %]
  124. echo 'pref("extensions.torlauncher.prompt_for_locale", false);' >> "$GENERATEDPREFSPATH"
  125. [% END %]
  126. [% IF c("var/linux") %]
  127. chmod 700 ${TB_STAGE_DIR}/Browser/TorBrowser/Data/Browser
  128. chmod 700 ${TB_STAGE_DIR}/Browser/TorBrowser/Data/Tor
  129. [% END %]
  130. [% IF c("var/multi_lingual") %]
  131. # If we are building a multi-lingual package, use "ALL" in the package name
  132. # and as the locale for update purposes. We do not include "ALL" in the name
  133. # of the directory that is inside the package (in other words, users will
  134. # not see tor-browser_ALL after they install Tor Browser).
  135. PKG_LOCALE="ALL"
  136. PKG_DIR="tor-browser"
  137. [% ELSE %]
  138. PKG_LOCALE="en-US"
  139. PKG_DIR="tor-browser_${PKG_LOCALE}"
  140. [% END %]
  141. pushd "$TBDIR[% IF c("var/osx") %]/Contents/Resources[% END %]/browser/"
  142. unzip omni.ja defaults/preferences/000-tor-browser.js || [ $? -lt 3 ]
  143. # Append our built extension-overrides.js to 000-tor-browser.js
  144. cat "$GENERATEDPREFSPATH" >> defaults/preferences/000-tor-browser.js
  145. cp defaults/preferences/000-tor-browser.js $rootdir
  146. [% IF c("var/osx") %]
  147. # Embed our default bookmarks within the en-US locale.
  148. mkdir -p chrome/en-US/locale/browser
  149. cp -p $rootdir/bookmarks.html chrome/en-US/locale/browser/
  150. [% c("var/touch") %] chrome/en-US/locale/browser/bookmarks.html
  151. chmod 600 chrome/en-US/locale/browser/bookmarks.html
  152. zip -Xm omni.ja chrome/en-US/locale/browser/bookmarks.html
  153. rm -rf chrome
  154. [% END %]
  155. # Set the locale of the bundle.
  156. echo "pref(\"intl.locale.requested\", \"en-US\");" >> defaults/preferences/000-tor-browser.js
  157. [% c("var/touch") %] defaults/preferences/000-tor-browser.js
  158. zip -Xm omni.ja defaults/preferences/000-tor-browser.js
  159. rm -rf defaults
  160. # create tbb_version.json file for #25020
  161. echo '{"version":"[% c("var/torbrowser_version") %]","architecture":"[% c("var/mar_osname") %]","channel":"[% c("var/channel") %]","locale":"en-US"}' > ../tbb_version.json
  162. popd
  163. [% IF c("var/osx") || c("var/multi_lingual") -%]
  164. # Prepare our language packs to embed our default bookmarks.
  165. # See bug 21879 for more details.
  166. [% SET locales = c("var/testbuild") ? [] : c("var/locales") -%]
  167. [% FOREACH lang = locales %]
  168. [% SET lang = tmpl(lang);
  169. SET xpi = '$rootdir/' _ c('input_files_by_name/firefox-langpacks') _ '/' _ lang _ '.xpi';
  170. %]
  171. [% IF c("var/osx") -%]
  172. unzip -d prep_[% lang %] [% xpi %]
  173. cp $rootdir/bookmarks.html prep_[% lang %]/browser/chrome/[% lang %]/locale/browser/
  174. rm [% xpi %]
  175. cd prep_[% lang %]
  176. [% c('zip', {
  177. zip_src => [ '.' ],
  178. zip_args => xpi,
  179. }) %]
  180. [% END -%]
  181. # If we are building a multi-lingual package, add all of the language packs.
  182. [% IF c("var/multi_lingual") %]
  183. cp [% xpi %] "$TBDIR/$EXTSPATH/langpack-[% lang %]@firefox.mozilla.org.xpi"
  184. [% END %]
  185. cd ..
  186. rm -rf prep_[% lang %]
  187. [% END %]
  188. [% END %]
  189. [% IF c("var/multi_lingual") %]
  190. # Set the update.locale (it is used to replace %LOCALE% within
  191. # app.update.url).
  192. pushd "$TBDIR[% IF c("var/osx") %]/Contents/Resources/[% END %]"
  193. echo ${PKG_LOCALE} > update.locale
  194. [% c("var/touch") %] update.locale
  195. zip -Xm omni.ja update.locale
  196. popd
  197. [% END %]
  198. [% IF c("var/windows") %]
  199. tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/nsis') %]
  200. export PATH="/var/tmp/dist/nsis/bin:$PATH"
  201. tar -C $distdir -xf $rootdir/[% c('input_files_by_name/tbb-windows-installer') %]
  202. mv ${TB_STAGE_DIR} $distdir/tbb-windows-installer/"Tor Browser"
  203. mv $distdir/tbb-windows-installer ${TB_STAGE_DIR}
  204. [% END %]
  205. [% IF c("var/windows") %]
  206. TBDIR="$distdir/$PKG_DIR/Tor Browser/Browser"
  207. [% ELSIF c("var/osx") %]
  208. TBDIR="$distdir/$PKG_DIR/Tor Browser.app"
  209. [% ELSE %]
  210. TBDIR="$distdir/$PKG_DIR/Browser"
  211. [% END %]
  212. cat > "$scripts_dir/create-$PKG_DIR" << SCRIPT_EOF
  213. #!/bin/bash
  214. set -e
  215. cp -a ${TB_STAGE_DIR} $distdir/$PKG_DIR
  216. pushd "$TBDIR[% IF c("var/osx") %]/Contents/Resources/[% END %]"
  217. rm -f precomplete
  218. python $MARTOOLS/createprecomplete.py
  219. popd
  220. cd $distdir
  221. [% IF c("var/build_mar") -%]
  222. # Create full MAR file and compressed package.
  223. [% SET mar_file = 'tor-browser-' _ c("var/mar_osname") _ '-' _ c("var/torbrowser_version") _ '_${PKG_LOCALE}.mar' %]
  224. MAR=$MARTOOLS/mar \
  225. MOZ_PRODUCT_VERSION=[% c("var/torbrowser_version") %] \
  226. MAR_CHANNEL_ID=torbrowser-torproject-[% c("var/channel") %] \
  227. $MARTOOLS/make_full_update.sh -q $OUTDIR/[% mar_file %] "$TBDIR"
  228. [% END -%]
  229. [% IF c("var/linux") %]
  230. [% c('tar', {
  231. tar_src => [ '$PKG_DIR' ],
  232. tar_args => '-cJf $OUTDIR/tor-browser-' _ c("var/mar_osname") _ '-' _ c("var/torbrowser_version") _ '_${PKG_LOCALE}.tar.xz',
  233. }) %]
  234. [% ELSIF c("var/osx") %]
  235. [% c('var/ddmg', {
  236. dmg_src => '"$PKG_DIR"',
  237. dmg_out => '$OUTDIR/TorBrowser-' _ c("var/torbrowser_version") _ '-osx64_${PKG_LOCALE}.dmg',
  238. }) %]
  239. [% ELSIF c("var/windows") %]
  240. find "$PKG_DIR" -exec [% c("var/touch") %] {} \;
  241. pushd "$PKG_DIR"
  242. makensis torbrowser.nsi
  243. # Working around NSIS braindamage
  244. mv torbrowser-install.exe torbrowser-install-tmp.exe
  245. python3 $rootdir/pe_checksum_fix.py
  246. mv torbrowser-install-tmp2.exe torbrowser-install.exe
  247. rm torbrowser-install-tmp.exe
  248. mv torbrowser-install.exe $OUTDIR/torbrowser-install[% IF c("var/windows-x86_64") %]-win64[% END %]-[% c("var/torbrowser_version") %]_${PKG_LOCALE}.exe
  249. popd
  250. [% END %]
  251. rm -rf $distdir/${PKG_DIR}
  252. SCRIPT_EOF
  253. cp $rootdir/[% c('input_files_by_name/firefox') %]/mar-tools-*.zip "$OUTDIR"/
  254. [% IF c("var/linux-x86_64") -%]
  255. cp $rootdir/[% c('input_files_by_name/firefox') %]/tor-browser-debug.tar.xz "$OUTDIR"/tor-browser-[% c("var/mar_osname") %]-debug.tar.xz
  256. [% IF !c("var/asan") -%]
  257. cp $rootdir/[% c('input_files_by_name/firefox') %]/geckodriver-linux64.tar.xz "$OUTDIR"/
  258. [% END -%]
  259. [% END -%]
  260. [% IF c("var/linux") -%]
  261. cp $rootdir/[% c('input_files_by_name/tor') %]/tor-debug.tar.xz "$OUTDIR"/tor-[% c("var/mar_osname") %]-debug.tar.xz
  262. [% END -%]
  263. [% IF c("var/build_infos_json") -%]
  264. cp $rootdir/[% c('input_files_by_name/firefox') %]/build-infos.json "$OUTDIR"/build-infos-[% c("var/mar_osname") %].json
  265. [% END -%]
  266. # Create a tarball with all Linux x86_64 language packs (Bug 32676)
  267. [% IF c("var/linux-x86_64") && ! c("var/multi_lingual") && ! c("var/testbuild") -%]
  268. pushd $rootdir/[% c('input_files_by_name/firefox-langpacks') %]
  269. [% c('tar', {
  270. tar_src => [ '.' ],
  271. tar_args => '-cJf $OUTDIR/langpacks-tor-browser-linux64-' _ c("var/torbrowser_version") _ '.tar.xz',
  272. })
  273. %]
  274. popd
  275. [% END -%]
  276. # If we did not create a multi-lingual package above, create a package for
  277. # each locale.
  278. [% IF ! c("var/multi_lingual") %]
  279. [% SET locales = c("var/testbuild") ? [] : c("var/locales") -%]
  280. [% FOREACH lang = locales %]
  281. [% SET lang = tmpl(lang);
  282. SET xpi = '$rootdir/' _ c('input_files_by_name/firefox-langpacks') _ '/' _ lang _ '.xpi';
  283. SET tbdir = '$distdir/tor-browser_' _ lang;
  284. SET mar_file = 'tor-browser-' _ c("var/mar_osname") _ '-' _ c("var/torbrowser_version") _ '_' _ lang _ '.mar';
  285. IF c("var/osx");
  286. SET browserdir = tbdir _ '/Tor Browser.app';
  287. ELSIF c("var/windows");
  288. SET browserdir = tbdir _ '/Tor Browser/Browser';
  289. ELSE;
  290. SET browserdir = tbdir _ '/Browser';
  291. END;
  292. SET build_mar = c("var/build_mar");
  293. # On nightly we only build mar files for some locales
  294. IF c("var/nightly") && c("var/build_mar");
  295. build_mar = 0;
  296. FOREACH mar_lang = c("var/mar_locales");
  297. mar_lang = tmpl(mar_lang);
  298. IF mar_lang == lang;
  299. build_mar = 1;
  300. END;
  301. END;
  302. END;
  303. %]
  304. cat > "$scripts_dir/create-tor-browser_[% lang %]" << SCRIPT_EOF
  305. #!/bin/bash
  306. set -e
  307. cp -a ${TB_STAGE_DIR} [% tbdir %]
  308. cp [% xpi %] "[% browserdir %]/$EXTSPATH/langpack-[% lang %]@firefox.mozilla.org.xpi"
  309. pushd "[% browserdir %]/[% IF c("var/osx") %]Contents/Resources/[% END %]browser/"
  310. mkdir -p defaults/preferences
  311. cp $rootdir/000-tor-browser.js defaults/preferences/
  312. # Set the locale of the bundle.
  313. echo "pref(\"intl.locale.requested\", \"[% lang %]\");" >> defaults/preferences/000-tor-browser.js
  314. [% c("var/touch") %] defaults/preferences/000-tor-browser.js
  315. zip -Xm omni.ja defaults/preferences/000-tor-browser.js
  316. rm -rf defaults
  317. # create tbb_version.json file for #25020
  318. echo '{"version":"[% c("var/torbrowser_version") %]","architecture":"[% c("var/mar_osname") %]","channel":"[% c("var/channel") %]","locale":"[% lang %]"}' > ../tbb_version.json
  319. popd
  320. # Set the update.locale (it is used to replace %LOCALE% within
  321. # app.update.url), remove the en-US spellchecking dictionary, and
  322. # recreate precomplete file (needs to be accurate for full MAR updates).
  323. pushd "[% browserdir %]/[% IF c("var/osx") %]Contents/Resources/[% END %]"
  324. echo "[% lang %]" > update.locale
  325. [% c("var/touch") %] update.locale
  326. zip -Xm omni.ja update.locale
  327. rm -rf dictionaries
  328. rm -f precomplete
  329. python $MARTOOLS/createprecomplete.py
  330. popd
  331. cd $distdir
  332. [% IF build_mar -%]
  333. # Create full MAR file and compressed package for this locale.
  334. MAR=$MARTOOLS/mar \
  335. MOZ_PRODUCT_VERSION=[% c("var/torbrowser_version") %] \
  336. MAR_CHANNEL_ID=torbrowser-torproject-[% c("var/channel") %] \
  337. $MARTOOLS/make_full_update.sh -q $OUTDIR/[% mar_file %] "[% browserdir %]"
  338. [% END -%]
  339. [% IF c("var/linux") %]
  340. [% SET tardir = 'tor-browser_' _ lang;
  341. c('tar', {
  342. tar_src => [ tardir ],
  343. tar_args => '-cJf $OUTDIR/tor-browser-' _ c("var/mar_osname") _ '-' _ c("var/torbrowser_version") _ '_' _ lang _ '.tar.xz',
  344. }) %]
  345. [% ELSIF c("var/osx") %]
  346. [% # Rename the Japanese bundle to not confuse users
  347. IF lang == 'ja-JP-mac';
  348. SET lang = 'ja';
  349. END; -%]
  350. [% c('var/ddmg', {
  351. dmg_src => tbdir,
  352. dmg_out => '$OUTDIR/TorBrowser-' _ c("var/torbrowser_version") _ '-osx64_' _ lang _ '.dmg',
  353. }) %]
  354. [% ELSIF c("var/windows") %]
  355. find "[% tbdir %]" -exec [% c("var/touch") %] {} \;
  356. pushd "[% tbdir %]"
  357. makensis torbrowser.nsi
  358. # Working around NSIS braindamage
  359. mv torbrowser-install.exe torbrowser-install-tmp.exe
  360. python3 $rootdir/pe_checksum_fix.py
  361. mv torbrowser-install-tmp2.exe torbrowser-install.exe
  362. rm torbrowser-install-tmp.exe
  363. mv torbrowser-install.exe $OUTDIR/torbrowser-install[% IF c("var/windows-x86_64") %]-win64[% END %]-[% c("var/torbrowser_version") %]_[% lang %].exe
  364. popd
  365. [% END %]
  366. rm -rf [% tbdir %]
  367. SCRIPT_EOF
  368. [% END %]
  369. [% END %]
  370. chmod 775 $rootdir/run_scripts "$scripts_dir"/*
  371. $rootdir/run_scripts [% c("buildconf/num_procs") %] "$scripts_dir"