|
12 | 12 |
|
13 | 13 | # Ensure we are in RosBE. |
14 | 14 | if [ "$ROS_ARCH" = "" ]; then |
15 | | - echo "Please run this script inside RosBE!" |
16 | | - exit 1 |
| 15 | + echo "Please run this script inside RosBE!" |
| 16 | + exit 1 |
17 | 17 | fi |
18 | 18 |
|
19 | 19 | # Ensure this is running inside a git directory. |
20 | 20 | if [ ! -d "${ROOTDIR}/.git" ]; then |
21 | | - echo "Please run this script inside a ReactOS git directory. Release aborted." |
22 | | - exit 1 |
| 21 | + echo "Please run this script inside a ReactOS git directory. Release aborted." |
| 22 | + exit 1 |
23 | 23 | fi |
24 | 24 |
|
25 | 25 | # Check for internet connection. |
26 | 26 | wget -q --spider https://reactos.org |
27 | 27 |
|
28 | 28 | if [ $? -eq 0 ]; then |
29 | | - internet=true |
| 29 | + internet=true |
30 | 30 | else |
31 | | - echo "Warning! No internet connection detected." |
32 | | - echo "Optional modules cannot be downloaded and origin cannot be fetched." |
33 | | - echo |
| 31 | + echo "Warning! No internet connection detected." |
| 32 | + echo "Optional modules cannot be downloaded and origin cannot be fetched." |
| 33 | + echo |
34 | 34 | fi |
35 | 35 |
|
36 | 36 | # Get version (ex: 0.4.15-4-ge1e96bf467b5ea). |
|
48 | 48 |
|
49 | 49 | # Ensure version and branch name are not null. |
50 | 50 | if [ "$version" = "" ] || [ "$branch_name" = "" ]; then |
51 | | - echo "Version or branch name is NULL! Release aborted." |
52 | | - exit 1 |
| 51 | + echo "Version or branch name is NULL! Release aborted." |
| 52 | + exit 1 |
53 | 53 | fi |
54 | 54 |
|
55 | 55 | # Clean repository, excluding the modules/optional folder and its contents. |
56 | 56 | git clean -d -f -f -x --exclude="/modules/optional/*" || exit 1 |
57 | 57 | # Fetch changes from origin if we have an internet connection. |
58 | 58 | if [ "$internet" ]; then |
59 | | - git fetch origin || exit 1 |
| 59 | + git fetch origin || exit 1 |
60 | 60 | fi |
61 | 61 | # Reset to the head of the branch |
62 | 62 | git reset --hard HEAD || exit 1 |
|
65 | 65 | # Download the "optional" folder from svn.reactos.org if it isn't already downloaded. |
66 | 66 | # Ensure the optional modules folder is there and contains the modules we need. |
67 | 67 | if [ -d "${OPTMODDIR}" ] && [ -f "${OPTMODDIR}/DroidSansFallback.ttf" ] && compgen -G "${OPTMODDIR}/wine_gecko*.msi" > /dev/null; then |
68 | | - echo "Optional modules already downloaded. Skipping." |
69 | | - echo "If you have an issue with the optional modules, re-run this script after deleting the directory:" |
70 | | - echo " ${ROOTDIR}/${OPTMODDIR}" |
| 68 | + echo "Optional modules already downloaded. Skipping." |
| 69 | + echo "If you have an issue with the optional modules, re-run this script after deleting the directory:" |
| 70 | + echo " ${ROOTDIR}/${OPTMODDIR}" |
71 | 71 | elif [ "${internet}" ]; then |
72 | | - echo "Downloading optional modules..." |
73 | | - mkdir "${OPTMODDIR}" || exit 1 |
74 | | - cd "${OPTMODDIR}" || exit 1 |
75 | | - wget --recursive --level=1 --no-directories --no-parent --execute robots=off "https://svn.reactos.org/optional" || exit 1 |
76 | | - # Check that all mandatory files were downloaded. |
77 | | - if [ ! -f "DroidSansFallback.ttf" ]; then |
78 | | - echo "DroidSansFallback CJK font missing!" |
79 | | - exit 1 |
80 | | - fi |
81 | | - if ! compgen -G "wine_gecko*.msi" > /dev/null; then |
82 | | - echo "wine_gecko MSI package missing!" |
83 | | - exit 1 |
84 | | - fi |
| 72 | + echo "Downloading optional modules..." |
| 73 | + if [ -d "${OPTMODDIR}" ]; then |
| 74 | + rm -rf "${OPTMODDIR}" |
| 75 | + fi |
| 76 | + mkdir "${OPTMODDIR}" || exit 1 |
| 77 | + cd "${OPTMODDIR}" || exit 1 |
| 78 | + wget --recursive --level=1 --no-directories --no-parent --execute robots=off "https://svn.reactos.org/optional" || exit 1 |
| 79 | + # Check that all mandatory files were downloaded. |
| 80 | + if [ ! -f "DroidSansFallback.ttf" ]; then |
| 81 | + echo "DroidSansFallback CJK font missing!" |
| 82 | + exit 1 |
| 83 | + fi |
| 84 | + if ! compgen -G "wine_gecko*.msi" > /dev/null; then |
| 85 | + echo "wine_gecko MSI package missing!" |
| 86 | + exit 1 |
| 87 | + fi |
85 | 88 | else |
86 | | - echo "Missing optional modules and no internet connection. Release aborted." |
87 | | - exit 1 |
| 89 | + echo "Missing optional modules and no internet connection. Release aborted." |
| 90 | + exit 1 |
88 | 91 | fi |
89 | 92 | echo |
90 | 93 |
|
|
0 commit comments