summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functions17
1 files changed, 6 insertions, 11 deletions
diff --git a/functions b/functions
index 6ec795e..17c15b5 100644
--- a/functions
+++ b/functions
@@ -143,18 +143,13 @@ add_symlink() {
# $1: pathname of symlink on image
# $2: absolute path to target of symlink
- local fil dest dir
- if [[ -h $1 ]]; then
- fil="${1##$BASEDIR}"
- dest="${2##$BASEDIR}"
- add_dir $(get_dirname "${dest}")
- add_dir $(get_dirname "${fil}")
- if [[ ! -e "$TMPDIR/root/$dest" ]]; then
- (( QUIET )) || plain "adding symlink: $fil -> $dest"
- ln -s "$dest" "$TMPDIR/root/$fil"
- fi
+ local file=$1 dest=$2
+
+ add_dir $(get_dirname "$file")
+ if [[ ! -e "$TMPDIR/root/$dest" ]]; then
+ (( QUIET )) || plain "adding symlink: $file -> $dest"
+ ln -s "$dest" "$TMPDIR/root/$file"
fi
- #fail quietly
}
add_file() {