Author: roconnor
Date: Sat Oct 30 14:58:14 2010
New Revision: 24543
URL: https://svn.nixos.org/websvn/nix/?rev=24543&sc=1

Log:
Dwarf Fortress help files are also opened in read-write mode, so they too need 
to be hacked around.

Modified:
   nixpkgs/trunk/pkgs/games/dwarf-fortress/default.nix

Modified: nixpkgs/trunk/pkgs/games/dwarf-fortress/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/games/dwarf-fortress/default.nix Sat Oct 30 12:14:20 
2010        (r24542)
+++ nixpkgs/trunk/pkgs/games/dwarf-fortress/default.nix Sat Oct 30 14:58:14 
2010        (r24543)
@@ -35,7 +35,7 @@
 
     # Recreate a directory sturctor reflecting the original distribution in 
the user directory
 
-    # Now link in the static data
+    # Link in the static stuff
     mkdir -p \$DF_DIR
     ln -sf $out/share/df_linux/libs \$DF_DIR/
     ln -sf $out/share/df_linux/raw \$DF_DIR/
@@ -44,30 +44,21 @@
     # Delete old data directory
     rm -rf \$DF_DIR/data
     
-    # Link in the data directory
+    # Link in the static data directory
     mkdir \$DF_DIR/data
     for i in $out/share/df_linux/data/*
     do
      ln -s \$i \$DF_DIR/data/
     done
 
-    # index as of 0.31.16 opened in read/write mode 
+    # index initial_movies, announcement, and help files are as of 0.31.16 
opened in read/write mode instead of read-only mode
     # this is a hack to work around this
-    rm \$DF_DIR/data/index
-    cp $out/share/df_linux/data/index \$DF_DIR/data/index
-    chmod u+w \$DF_DIR/data/index
-
-    # initial_movies files are as of 0.31.16 opened in read/write mode instead 
of read-only mode
-    # this is a hack to work around this
-    rm \$DF_DIR/data/initial_movies
-    cp -rf $out/share/df_linux/data/initial_movies \$DF_DIR/data/
-    chmod -R u+w \$DF_DIR/data/initial_movies
-
-    # announcement files are as of 0.31.16 opened in read/write mode instead 
of read-only mode
-    # this is a hack to work around this
-    rm \$DF_DIR/data/announcement
-    cp -rf $out/share/df_linux/data/announcement \$DF_DIR/data/
-    chmod -R u+w \$DF_DIR/data/announcement
+    for i in index initial_movies announcement help
+    do
+     rm \$DF_DIR/data/\$i
+     cp -rf $out/share/df_linux/data/\$i \$DF_DIR/data/
+     chmod -R u+w \$DF_DIR/data/\$i
+    done
 
     # link in persistant data
     mkdir -p \$DF_DIR/save
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to