|
|
@@ -254,6 +254,8 @@ symlink_to_dir() {
|
|
|
[ -n "$SYMLINK" ] || error "symlink parameter is missing"
|
|
|
[ "${SYMLINK#/}" = "$SYMLINK" ] && \
|
|
|
error "symlink pathname is not an absolute path"
|
|
|
+ [ "${SYMLINK%/}" = "$SYMLINK" ] && \
|
|
|
+ error "symlink pathname ends with a slash"
|
|
|
[ -n "$SYMLINK_TARGET" ] || error "original symlink target is missing"
|
|
|
[ -n "$1" ] || error "maintainer script parameters are missing"
|
|
|
|
|
|
@@ -305,7 +307,7 @@ symlink_to_dir() {
|
|
|
## Functions to replace a directory with a symlink
|
|
|
##
|
|
|
dir_to_symlink() {
|
|
|
- local PATHNAME="$1"
|
|
|
+ local PATHNAME="${1%/}"
|
|
|
local SYMLINK_TARGET="$2"
|
|
|
local LASTVERSION="$3"
|
|
|
local PACKAGE="$4"
|