source: mainline/tools/release.sh@ 77578e8

Last change on this file since 77578e8 was 8fd0675f, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago

Update files with /bin/sh shebang and an extra space

  • Property mode set to 100755
File size: 1.2 KB
Line 
1#!/bin/sh
2#
3# SPDX-FileCopyrightText: 2019 Jiří Zárevúcky
4#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7
8# Find out the path to the script.
9SOURCE_DIR=`which -- "$0" 2>/dev/null`
10# Maybe we are running bash.
11[ -z "$SOURCE_DIR" ] && SOURCE_DIR=`which -- "$BASH_SOURCE"`
12[ -z "$SOURCE_DIR" ] && exit 1
13SOURCE_DIR=`dirname -- "$SOURCE_DIR"`
14SOURCE_DIR=`cd $SOURCE_DIR && cd .. && echo $PWD`
15
16
17echo "Running tools/build_all.sh"
18
19mkdir -p build_all
20cd build_all
21sh "${SOURCE_DIR}/tools/build_all.sh"
22cd ..
23
24echo
25echo
26
27PROFILES=`sh ${SOURCE_DIR}/tools/list_profiles.sh`
28RELEASE=`sed -n 's:^HELENOS_RELEASE \?= \?\(.*\)$:\1:p' "${SOURCE_DIR}/version"`
29SRC_ARCHIVE="HelenOS-${RELEASE}-src.tar"
30
31git -C "${SOURCE_DIR}" archive master -o "${PWD}/${SRC_ARCHIVE}"
32bzip2 -f "${SRC_ARCHIVE}"
33echo "Created ${SRC_ARCHIVE}.bz2"
34
35for profile in $PROFILES; do
36 image_name=`cat build_all/$profile/image_path`
37 if [ -z "$image_name" ]; then
38 continue
39 fi
40
41 image_path="build_all/$profile/`cat build_all/$profile/image_path`"
42 image_suffix=`echo "$image_name" | sed 's:.*\.::'`
43
44 release_name="HelenOS-${RELEASE}-`echo $profile | tr '/' '-'`.$image_suffix"
45 cp "$image_path" "$release_name"
46
47 echo "Created $release_name"
48done
Note: See TracBrowser for help on using the repository browser.