Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
lifelines
sh.rellink
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File sh.rellink of Package lifelines
set +o posix relpath () { local OLDIFS IFS local orgwords locwords local newpath="" local relp deep p l OLDIFS="$IFS"; IFS=/ eval declare -a orgwords=(${1// /\\\\ }) eval declare -a locwords=(${2// /\\\\ }) IFS="$OLDIFS" declare -i relp=0 declare -i deep=0 for p in "${orgwords[@]}" ; do eval l="\${locwords[$((deep++))]}" if test "$l" != "$p" -o $relp -ne 0 ; then : $((relp++)) newpath="${newpath}/$p" test -n "$l" || continue if test $relp -eq 1 ; then newpath="..${newpath}" else newpath="../${newpath}" fi fi done unset OLDIFS orgwords p l if test $deep -lt ${#locwords[@]} ; then relp=0 while test $relp -lt $deep; do unset locwords[$((relp++))] done while test ${#locwords[@]} -gt 0 ; do newpath="../${newpath}" unset locwords[$((relp++))] done fi echo "$newpath" } rellink () { local relpath=$(relpath "${1%/*}" "${2%/*}" 2>/dev/null) if test -d "$1" ; then ln -sf "$relpath/${1##*/}/" "$2" else ln -sf "$relpath/${1##*/}" "$2" fi }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor