Safer way to rewrite the symlink when install and upgrade package.
Fixes: #1433
Change-Id: I4f62f47255faae35010316082e665b52466200d6
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
if [ ! -d /var/lib/jenkins/userContent ]; then
mkdir -p /var/lib/jenkins/userContent
fi
-ln -sf %{destdir} /var/lib/jenkins/userContent/jenkins-scripts
+ln -sf %{destdir} /var/lib/jenkins/userContent/
%postun common
if [ -L /var/lib/jenkins/userContent/jenkins-scripts ]; then