• R/O
  • HTTP
  • SSH
  • HTTPS

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

ファイル情報

Rev. 2951f885dc8336d3be8044fb6265dd4e6dbeb14d
サイズ 1,596 バイト
日時 2014-12-23 00:31:57
作者 umorigu
ログメッセージ

Improve handling of UTF-8 only functions

Now we don't need "//UTF-8 only" trailing comment for UTF-8 functions.
Converter understand PukiWiki 1.5.x specific source code and
prepend "//UTF-8:" comment heads to UTF-8 only lines on converting EUC-JP.

内容

#!/bin/sh
# $Id: pkwk_chmod.sh,v 1.10 2011/01/24 15:12:51 henoheno Exp $
#  Chmod script for PukiWiki DATA_HOME
#  ==========================================================
   Copyright='(C) 2002-2004 minix-up project, All Rights Reserved'
   Homepage='http://cvsknit.sourceforge.net/'
   License='(also revised)BSD Licnese, NO WARRANTY'
#

check_dir()
{
  for dir in "$@"; do
    test -d "$dir" || return 1
  done
  return 0
}

list_dir()
{
  # Needed
  echo 'wiki'
  echo 'diff'
  echo 'backup'

  # Optional
  ls -d 'cache' 'counter' 'attach' wiki.[a-z][a-z] 2>/dev/null | while read dir; do
    echo "$dir"
  done
}

list_files()
{
  for dir in "$@"; do
    case "$dir" in
      attach )
         # Unfortunately attach/attached-files have no suffix
         # that should be .bin or someting
         find "$dir" -type f -name '*.log'
      ;;
      backup ) find "$dir" -type f \( -name '*.txt' -or -name '*.gz'     \) ;;
      cache  ) find "$dir" -type f \( -name '*.dat' -or -name '*.re[fl]' -or -name '*.lock' \) ;;
      *      ) find "$dir" -type f -name '*.txt' ;;
    esac
  done
}


# Validate
if ! check_dir ` list_dir ` ; then
  echo 'ERROR: Seems not pukiwiki DATA_HOME'
  exit 1
fi

# Run
list_dir | while read dir; do
  chmod 777 "$dir" && {
    list_files "$dir" | while read file; do
      chmod 666 "$file"
    done
  }
done

# ERRATA
chmod a-x INSTALL.txt image/b_pukiwiki.official.png

chmod o+r .ht* */.htaccess *.php */*.php image/*.png image/face/*.png */index.html
chmod o+rx lib skin plugin image image/face

#chmod o+rx doc
#chmod o+r *.txt doc/*.txt

# .htaccess