make preparatives for the new version
[dragora.git] / packages / makeISO
blobd2124a62f86954f6880bed487357d382eb50a4cb
1 #! /bin/sh -
3 # Creates packages ISO (from current directory)
5 # Copyright (c) 2019 Matias Fonzo, <selk@dragora.org>.
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 MKISOFS="${MKISOFS:-mkisofs}"
21 case $1 in
22 i586)
23 include_directory=i586
24 exclude_path=x86_64
26 x86_64)
27 include_directory=x86_64
28 exclude_path=i586
31 echo "${0##*/}: it requires an argument 'i586' or 'x86_64' for the ISO" 1>&2
32 exit 1;
33 esac
35 ISONAME="${ISONAME:-dragora-3.0_$(date +%Y%m%d)-${include_directory}-packages}"
37 rm -f -v $ISONAME
39 $MKISOFS -v -o ${ISONAME}.iso \
40 -A 'Dragora Packages' -V 'Dragora Packages' \
41 -m '.keep' -m "${0##*/}" -m 'makeTags' \
42 -x "dragora-*.iso*" -x $exclude_path \
43 -R -J -U -hide-rr-moved .
45 echo "Making .sha256 sum ..."
46 sha256sum ${ISONAME}.iso > ${ISONAME}.iso.sha256