On 06/04/2013 06:11 PM, Olе Streicher wrote:
Hi all, one more proposal regarding directory structure: According to the freedeskto.org, the directories imlib$ and cache$ should go into the user's home dir on default: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html which leads to a change in mkiraf.csh (see below). This creates and uses the files ${HOME}/.local/share/imdir - as user image directory ${HOME}/.cache/iraf - as user cache dir
Wouldn't be safer to use ${HOME}/.local/share/iraf/imdir instead of ${HOME}/.local/share/imdir?
Regards, Germán.
Best regards Ole --- a/unix/hlib/mkiraf.csh +++ b/unix/hlib/mkiraf.csh @@ -4,7 +4,7 @@ # The following definitions are site dependent. [SITEDEP] -set iraf = "/iraf/iraf" +set iraf = "/usr/share/iraf" set imdir = "/iraf/imdirs" set cachedir = "/iraf/cache" set ttymsg =\ @@ -93,16 +93,22 @@ pwd | sed -e "s;.*;s+U_UPARM+&/uparm/+;" >> _sed if (! (-e "$imdir" && -w "$imdir") ) then - set imdir = HDR$ - whoami | sed -e "s;.*;s+U_IMDIR+${imdir}/+;" >> _sed + if ( ${?XDG_DATA_HOME} == 0 ) then + setenv XDG_DATA_HOME ${HOME}/.local/share + endif + echo "s+U_IMDIR+${XDG_DATA_HOME}/imdir/+" >> _sed + mkdir -p ${XDG_DATA_HOME}/imdir/ else whoami | sed -e "s;.*;s+U_IMDIR+${imdir}/&/+;" >> _sed whoami | sed -e "s;.*;mkdir $imdir/& 2> /dev/null;" | sh endif if (! (-e "$cachedir" && -w "$cachedir") ) then - set cachedir = /tmp/ - whoami | sed -e "s;.*;s+U_CACHEDIR+${cachedir}/+;" >> _sed + if ( ${?XDG_CACHE_HOME} == 0 ) then + setenv XDG_CACHE_HOME ${HOME}/.cache + endif + echo "s+U_CACHEDIR+${XDG_CACHE_HOME}/iraf/+" >> _sed + mkdir -p ${XDG_CACHE_HOME}/iraf/ else whoami | sed -e "s;.*;s+U_CACHEDIR+${cachedir}/&/+;" >> _sed whoami | sed -e "s;.*;mkdir $cachedir/& 2> /dev/null;" | sh _______________________________________________ Fedora astronomy mailing list astronomy@xxxxxxxxxxxxxxxxxxxxxxx http://fedoraproject.org/wiki/SIGs/Astronomy https://admin.fedoraproject.org/mailman/listinfo/astronomy
-- Germán A. Racca Fedora Package Maintainer https://fedoraproject.org/wiki/User:Skytux _______________________________________________ Fedora astronomy mailing list astronomy@xxxxxxxxxxxxxxxxxxxxxxx http://fedoraproject.org/wiki/SIGs/Astronomy https://admin.fedoraproject.org/mailman/listinfo/astronomy