Tomotaka SUWA
t-suw****@users*****
2006年 2月 19日 (日) 16:09:12 JST
Index: AquaSKK/Package/scripts/postflight diff -u AquaSKK/Package/scripts/postflight:1.1.2.1 AquaSKK/Package/scripts/postflight:1.1.2.2 --- AquaSKK/Package/scripts/postflight:1.1.2.1 Sun Feb 19 13:50:55 2006 +++ AquaSKK/Package/scripts/postflight Sun Feb 19 16:09:12 2006 @@ -1,33 +1,44 @@ #!/bin/sh # domain +PREF=~/Library/Preferences + OLD_DOMAIN="org.ccm-software.AquaSKKServer" NEW_DOMAIN="jp.sourceforge.AquaSKKServer" -PLIST_FILE=~/Library/Preferences/$NEW_DOMAIN.plist + +FILE_PATH=$PREF/$NEW_DOMAIN + +OLD_PLIST=$PREF/$OLD_DOMAIN.plist +NEW_PLIST=$FILE_PATH.plist # already exists ? -if [ -f $PLIST_FILE ]; then - echo "[$PLIST_FILE] already exists." - exit +if [ -f $NEW_PLIST ]; then + echo "[$NEW_PLIST] already exists." + exit 0 fi # copy old user defaults -defaults read $OLD_DOMAIN > $PLIST_FILE +cp $OLD_PLIST $NEW_PLIST # rename keys -defaults rename $NEW_DOMAIN dic.FontName.Window candidates_font_name -defaults rename $NEW_DOMAIN dic.FontSize.Window candidates_font_size -defaults rename $NEW_DOMAIN dic.WindowAlpha.kotoeri candidates_window_alpha -defaults rename $NEW_DOMAIN dic.WindowColor.kotoeri candidates_window_color -defaults rename $NEW_DOMAIN dic.skk-egg-like-newline.kotoeri egg_like_newline -defaults rename $NEW_DOMAIN ForceASCIImodeStartup force_ascii_mode_startup -defaults rename $NEW_DOMAIN KeyboardLayoutIdentifier keyboard_layout_id -defaults rename $NEW_DOMAIN dic.NumericKeypad_HalfWidth.kotoeri numkeypad_must_halfwidth -defaults rename $NEW_DOMAIN pref.skkserv.enabled skkserv_enabled -defaults rename $NEW_DOMAIN pref.skkserv.local-only skkserv_localonly -defaults rename $NEW_DOMAIN pref.skkserv.port skkserv_port +defaults rename $FILE_PATH dic.FontName.Window candidates_font_name +defaults rename $FILE_PATH dic.FontSize.Window candidates_font_size +defaults rename $FILE_PATH dic.WindowAlpha.kotoeri candidates_window_alpha +defaults rename $FILE_PATH dic.WindowColor.kotoeri candidates_window_color +defaults rename $FILE_PATH dic.skk-egg-like-newline.kotoeri egg_like_newline +defaults rename $FILE_PATH ForceASCIImodeStartup force_ascii_mode_startup +defaults rename $FILE_PATH KeyboardLayoutIdentifier keyboard_layout_id +defaults rename $FILE_PATH dic.NumericKeypad_HalfWidth.kotoeri numkeypad_must_halfwidth +defaults rename $FILE_PATH pref.skkserv.enabled skkserv_enabled +defaults rename $FILE_PATH pref.skkserv.local-only skkserv_localonly +defaults rename $FILE_PATH pref.skkserv.port skkserv_port # delete unused keys -defaults delete $NEW_DOMAIN dic.path.kotoeri -defaults delete $NEW_DOMAIN dic.path.main -defaults delete $NEW_DOMAIN dic.path.sub +defaults delete $FILE_PATH dic.path.kotoeri +defaults delete $FILE_PATH dic.path.main +defaults delete $FILE_PATH dic.path.sub + +# change owner +chown $USER $NEW_PLIST + +exit 0