projects
/
grml-debootstrap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Install to directory: normalise the path to an absolute directory name.
[grml-debootstrap.git]
/
grml-debootstrap
diff --git
a/grml-debootstrap
b/grml-debootstrap
index
2544c85
..
681acc7
100755
(executable)
--- a/
grml-debootstrap
+++ b/
grml-debootstrap
@@
-104,10
+104,10
@@
fi
# cmdline handling {{{
# source external command line parameter-processing script
# cmdline handling {{{
# source external command line parameter-processing script
-if [ -r /usr/share/grml-debootstrap/functions/cmdlineopts.clp ] ; then
- . /usr/share/grml-debootstrap/functions/cmdlineopts.clp
-elif [ -r ./cmdlineopts.clp ] ; then
+if [ -r ./cmdlineopts.clp ] ; then
. ./cmdlineopts.clp
. ./cmdlineopts.clp
+elif [ -r /usr/share/grml-debootstrap/functions/cmdlineopts.clp ] ; then
+ . /usr/share/grml-debootstrap/functions/cmdlineopts.clp
else
echo "Error: cmdline function file not found, exiting.">&2
exit 1
else
echo "Error: cmdline function file not found, exiting.">&2
exit 1
@@
-574,15
+574,17
@@
set_target_directory(){
TUNE2FS=''
FSCK=''
GRUB=''
TUNE2FS=''
FSCK=''
GRUB=''
+ # make sure we normalise the path to an absolute directory name so something like:
+ # mkdir -p foo/a bar/a; (cd foo; grml-debootstrap -t a)&; (cd bar; grml-debootstrap -t a)&; wait
+ # works
+ TARGET="$(readlink -f $TARGET)"
}
}
-case $TARGET in
- /dev/shm/*) set_target_directory ;;
- /dev/*)
+if [ -b "$TARGET" ] ; then
PARTITION=1
PARTITION=1
- ;;
- *) set_target_directory ;;
-esac
+else
+ set_target_directory
+fi
# }}}
# architecture setup {{{
# }}}
# architecture setup {{{