[clfswm-cvs] r325 - in clfswm: . contrib

Philippe Brochard pbrochard at common-lisp.net
Thu Sep 16 13:15:05 UTC 2010


Author: pbrochard
Date: Thu Sep 16 09:15:04 2010
New Revision: 325

Log:
contrib/clfswm: Move clfswm sources to  if there is no write permission on . So anybody can start clfswm even if there is no write permission on the source directory.

Modified:
   clfswm/ChangeLog
   clfswm/TODO
   clfswm/contrib/clfswm

Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog	(original)
+++ clfswm/ChangeLog	Thu Sep 16 09:15:04 2010
@@ -1,3 +1,9 @@
+2010-09-16  Philippe Brochard  <pbrochard at common-lisp.net>
+
+	* contrib/clfswm: Move clfswm sources to $tmp_dir if there is no
+	write permission on $clfswm_asd_path. So anybody can start clfswm
+	even if there is no write permission on the source directory.
+
 2010-09-12  Philippe Brochard  <pbrochard at common-lisp.net>
 
 	* contrib/clfswm: Add support to cmucl, ccl and ecl.

Modified: clfswm/TODO
==============================================================================
--- clfswm/TODO	(original)
+++ clfswm/TODO	Thu Sep 16 09:15:04 2010
@@ -9,6 +9,12 @@
 
 Nothing here yet :)
 
+- contrib/clfswm: Test if source directory is writable to compile clfswm.
+if not copy clfswm source in $XDG_CACHE_HOME/clfswm/sources and set
+$clfswm_asd_path to it then compile from here.
+
+- configure: copy contrib/clfswm in . and set default values in it.
+
 MAYBE
 =====
 

Modified: clfswm/contrib/clfswm
==============================================================================
--- clfswm/contrib/clfswm	(original)
+++ clfswm/contrib/clfswm	Thu Sep 16 09:15:04 2010
@@ -39,6 +39,8 @@
 asdf_path="$(pwd)/contrib"
 clfswm_asd_path="$(pwd)"
 
+tmp_dir=/tmp
+
 
 usage() {
 
@@ -48,10 +50,10 @@
 f,force              force image dump
 rebuild              same as -f,--force
 l,with-lisp          use <lisp> as the common lisp implementation [$lisp]
-o,lisp-opt           use <opt> as lisp option
+o,lisp-opt           use <opt> as lisp option [$lisp_opt]
 d,dump-path          path to the dump directory [\$XDG_CACHE_HOME=$XDG_CACHE_HOME]
-with-clfswm          path to clfswm.asd file
-with-asdf            path to the asdf.lisp file"
+with-clfswm          path to clfswm.asd file [$clfswm_asd_path]
+with-asdf            path to the asdf.lisp file [$asdf_path]"
 
     exit 0
 }
@@ -159,12 +161,24 @@
     test -e $clfswm_asd_path/clfswm.asd || die "can't find clfswm.asd in $clfswm_asd_path"
     test -e $asdf_path/asdf.lisp || die "can't find asdf.lisp in $asdf_path"
 
+    # Move clfswm sources to $tmp_dir if there is no write permission on $clfswm_asd_path
+    if test ! -w $clfswm_asd_path ; then
+	rm -rf $tmp_dir/clfswm-tmp
+	mkdir $tmp_dir/clfswm-tmp
+	cp -R $clfswm_asd_path/* $tmp_dir/clfswm-tmp
+	clfswm_asd_path=$tmp_dir/clfswm-tmp
+	asdf_path=$tmp_dir/clfswm-tmp/contrib
+	echo "* Note: No write access in sources, copying in $clfswm_asd_path"
+    fi
+
     mkdir -p "$dump_path"
     mkdir -p "$dump_path/contrib"
     eval build_$lisp
     rm -rf "$dump_path/contrib"
     cp -R "$clfswm_asd_path/contrib/" "$dump_path/"
     rm -rf $(find "$dump_path/" -name "*svn")
+
+    rm -rf $tmp_dir/clfswm-tmp
 fi
 
 # Run the resulting image
@@ -182,3 +196,4 @@
 else
     echo "As requested, we have just dumped the image."
 fi
+




More information about the clfswm-cvs mailing list