<commit_before>#!/bin/bash

# This calls the script with the parameters I use daily.
# No other parameters have been tested.
# My aim is to make the cross compilation script default to these values
# so that this command line can be discarded.


# A default, switch to n for testing other parts of the build quickly.

build_ffmpeg=y
dump_archive=y
dump_file="/home/john/www/gallery/html/mingw-multimedia-executables.tar.xz"

# parse command line parameters, if any
while true; do
  case $1 in
    -h | --help ) echo "option is:
--ffmpeg=y/n  Build (y) or don't build (n) ffmpeg static binary
--archive=y/n  Zip-up and dump archive (y) or not (n) in a directory of your choice
       "; exit 0 ;;
    --ffmpeg=* ) build_ffmpeg="${1#*=}"; shift ;;
    --archive=* ) dump_archive="${1#*=}"; shift ;;
    -- ) shift; break ;;
    -* ) echo "Error, unknown option: '$1'."; exit 1 ;;
    * ) break ;;
  esac
done

echo "Going to cross compile."
echo "build_ffmpeg is ${build_ffmpeg}"
echo "dump_archive is ${dump_archive}"
echo "Archive will be dumped to ${dump_file}"


./cross_compile_ffmpeg_cygwin64.sh --build-ffmpeg-shared=n --build-ffmpeg-static=$build_ffmpeg --disable-nonfree=n --sandbox-ok=y --build-libmxf=y --build-mp4box=y --build-choice=win64 --git-get-latest=y --prefer-stable=n --build-mplayer=n

# Make archive of executables
if  [[ "$dump_archive" = [Yy] ]]; then
  echo "Archive dump selected."
  cd sandbox/mingw-w64-x86_64/x86_64-w64-mingw32
  tar acvvf ${dump_file} ./bin/*exe ./bin/*config ./lib/frei0r-1/* || exit 1
  echo "Archive made and stored in ${dump_file}"
fi

echo "Build script finished."<commit_msg>Don't use symbolic links in tarball, because Windows doesn't understand.<commit_after>#!/bin/bash

# This calls the script with the parameters I use daily.
# No other parameters have been tested.
# My aim is to make the cross compilation script default to these values
# so that this command line can be discarded.


# A default, switch to n for testing other parts of the build quickly.

build_ffmpeg=y
dump_archive=y
dump_file="/home/john/www/gallery/html/mingw-multimedia-executables.tar.xz"

# parse command line parameters, if any
while true; do
  case $1 in
    -h | --help ) echo "option is:
--ffmpeg=y/n  Build (y) or don't build (n) ffmpeg static binary
--archive=y/n  Zip-up and dump archive (y) or not (n) in a directory of your choice
       "; exit 0 ;;
    --ffmpeg=* ) build_ffmpeg="${1#*=}"; shift ;;
    --archive=* ) dump_archive="${1#*=}"; shift ;;
    -- ) shift; break ;;
    -* ) echo "Error, unknown option: '$1'."; exit 1 ;;
    * ) break ;;
  esac
done

echo "Going to cross compile."
echo "build_ffmpeg is ${build_ffmpeg}"
echo "dump_archive is ${dump_archive}"
echo "Archive will be dumped to ${dump_file}"


./cross_compile_ffmpeg_cygwin64.sh --build-ffmpeg-shared=n --build-ffmpeg-static=$build_ffmpeg --disable-nonfree=n --sandbox-ok=y --build-libmxf=y --build-mp4box=y --build-choice=win64 --git-get-latest=y --prefer-stable=n --build-mplayer=n

# Make archive of executables
if  [[ "$dump_archive" = [Yy] ]]; then
  echo "Archive dump selected."
  cd sandbox/mingw-w64-x86_64/x86_64-w64-mingw32
  # Symbolic links are de-referenced because Windows doesn't understand these.
  tar hacvvf ${dump_file} ./bin/*exe ./bin/*config ./lib/frei0r-1/* || exit 1
  echo "Archive made and stored in ${dump_file}"
fi

echo "Build script finished."
{'fraction_non_alphanumeric': 0.14146772767462423, 'fraction_numerical': 0.01650456822870616, 'mean_word_length': 3.630286493860846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '269197', 'n_tokens_mistral': 1237, 'n_tokens_neox': 1159, 'n_words': 379}