[Groonga-mysql-commit] mroonga/mroonga [master] Rename _images to image in sphinx2github.sh

Back to archive index

null+****@clear***** null+****@clear*****
2011年 6月 29日 (水) 13:08:25 JST


mooz	2011-06-29 04:08:25 +0000 (Wed, 29 Jun 2011)

  New Revision: 6eaed25325ddf607b54e76e213f524a98abd60db

  Log:
    Rename _images to image in sphinx2github.sh

  Modified files:
    doc/ja/sphinx2github.sh

  Modified: doc/ja/sphinx2github.sh (+16 -9)
===================================================================
--- doc/ja/sphinx2github.sh    2011-06-28 03:13:26 +0000 (c3ed497)
+++ doc/ja/sphinx2github.sh    2011-06-29 04:08:25 +0000 (83848e6)
@@ -1,20 +1,27 @@
 #!/bin/sh
 
+rename()
+{
+    old_name=$1
+    new_name=$2
+
+    if [ -d $old_name ]; then
+        rm -rf $new_name
+        mv $old_name $new_name
+    fi
+}
+
 cd html
 
-if [ -d _static ]; then
-    rm -rf static
-    mv _static static
-fi
-if [ -d _sources ]; then
-    rm -rf sources
-    mv _sources sources
-fi
+rename _static static
+rename _sources sources
+rename _images images
 
 file_names="`ls *.html`"
 for file_name in $file_names; do
     sed -e 's/_static/static/g' $file_name |
-    sed -e 's/_sources/sources/g' > buf.txt
+    sed -e 's/_sources/sources/g' |
+    sed -e 's/_images/images/g' > buf.txt
     cp buf.txt $file_name
     rm -f buf.txt
 done




Groonga-mysql-commit メーリングリストの案内
Back to archive index