projects
/
grml2usb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Write prompt label to an extra file to be more flexible
[grml2usb.git]
/
grml2iso
diff --git
a/grml2iso
b/grml2iso
index
f1e966f
..
a1eb117
100755
(executable)
--- a/
grml2iso
+++ b/
grml2iso
@@
-67,8
+67,8
@@
# variables {{{
ORIG_DIR="$(pwd)"
# variables {{{
ORIG_DIR="$(pwd)"
- # note: grub-pc_1.96+20090603-1
_i386.deb
seems to be b0rken
- GRUB_
DEB="grub-pc_1.96+20080724-16_i386.deb
"
+ # note: grub-pc_1.96+20090603-1 seems to be b0rken
+ GRUB_
VERSION="grub-pc_1.96+20080724-16
"
# normalise path
case $ISOFILE in
# normalise path
case $ISOFILE in
@@
-78,6
+78,7
@@
# }}}
# create necessary stuff under WRKDIR {{{
# }}}
# create necessary stuff under WRKDIR {{{
+ [ -d "$WRKDIR" ] && WRKDIR_EXISTED='true' || WRKDIR_EXISTED='false'
rm -rf "$WRKDIR/cddir" "$WRKDIR/grub_tmp"
mkdir -p "$WRKDIR/cddir" "$WRKDIR/grub_tmp"
# }}}}
rm -rf "$WRKDIR/cddir" "$WRKDIR/grub_tmp"
mkdir -p "$WRKDIR/cddir" "$WRKDIR/grub_tmp"
# }}}}
@@
-89,6
+90,13
@@
# install grub2 files {{{
# as we don't want to rely on a grub2 installation on the
# running system let's grab it from the net
# install grub2 files {{{
# as we don't want to rely on a grub2 installation on the
# running system let's grab it from the net
+ if which dpkg >/dev/null 2>&1 ; then
+ ARCH="$(dpkg --print-architecture)"
+ else
+ [[ $(uname -m) == x86_64 ]] && ARCH=amd64 || ARCH=i386
+ fi
+ GRUB_DEB="${GRUB_VERSION}_${ARCH}.deb"
+
cd "$WRKDIR"/grub_tmp/
wget http://ftp.de.debian.org/debian/pool/main/g/grub2/"$GRUB_DEB"
ar x "$GRUB_DEB"
cd "$WRKDIR"/grub_tmp/
wget http://ftp.de.debian.org/debian/pool/main/g/grub2/"$GRUB_DEB"
ar x "$GRUB_DEB"
@@
-136,6
+144,7
@@
cd "$ORIG_DIR"
sync
rm -rf "$WRKDIR/cddir" "$WRKDIR/grub_tmp"
cd "$ORIG_DIR"
sync
rm -rf "$WRKDIR/cddir" "$WRKDIR/grub_tmp"
+ [[ $WRKDIR_EXISTED = 'false' ]] && rmdir "$WRKDIR"
echo "Generated $ISOFILE"
# }}}
echo "Generated $ISOFILE"
# }}}