archive: Adjust entries in some files
[dragora.git] / packages / makeISO
blob38a3c48dbf1b989274c724ad8bee13d315827359
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 set -e
21 GENISOIMAGE="${GENISOIMAGE:-genisoimage}"
23 case $1 in
24 i586)
25 reflect_arch=i586
26 exclude_path=x86_64
28 x86_64)
29 reflect_arch=x86_64
30 exclude_path=i586
33 echo "${0##*/}: it requires an argument 'i586' or 'x86_64' for the ISO" 1>&2
34 exit 1;
35 esac
37 ISONAME="${ISONAME:-dragora-3.0_$(date +%Y%m%d)-${reflect_arch}-packages}"
39 rm -f -v $ISONAME
41 $GENISOIMAGE -v -o ${ISONAME}.iso \
42 -A 'Dragora Packages' -V 'Dragora Packages' \
43 -m '.keep' -m "${0##*/}" -m 'makeTags' \
44 -x "dragora-*.iso*" -x $exclude_path \
45 -R -J -U -hide-rr-moved -uid 0 -gid 0 \
46 -root packages .
48 echo "Making .sha256 sum for ${ISONAME}.iso ..."
49 sha256sum ${ISONAME}.iso > ${ISONAME}.iso.sha256