@echo " make update - update repository with the current dot files"
@echo " make commit - commit changes to the repository"
@echo " make install - update the current dot files with the repository"
+ @echo " make import FILES=<FILES>"
+ @echo " - import the dot files into the repository"
@echo
lint:
install: lint
perl ./tools/list-files.pl | perl ./tools/install.pl
-.PHONY: help lint update commit install
+ifeq ($(FILES),)
+import:
+ @echo "Specify at least one file."
+ @echo "Usage: make import FILES=<FILES>"
+ @exit 1
+else
+import:
+ perl ./tools/import.pl $(FILES)
+ -git status
+endif
+
+.PHONY: help lint update commit install import
--- /dev/null
+# -*- sh -*-
+
+function append_path {
+ local _varname="$1"
+ local _path="$2"
+
+ if [ -d "$_path" ]; then
+ local _var=$(eval echo $(printf '$%s' "$_varname"))
+
+ if [ "$_var" = "" ]; then
+ eval $(printf 'export %s="%s"' "$_varname" "$_path")
+ else
+ eval $(printf 'export %s="%s:$%s"' "$_varname" "$_path" "$_varname")
+ fi
+ fi
+}
+
+# PATH
+export PATH=""
+append_path PATH /bin
+append_path PATH /sbin
+append_path PATH /usr/bin
+append_path PATH /usr/sbin
+append_path PATH /usr/pkg/bin
+append_path PATH /usr/pkg/sbin
+append_path PATH /usr/local/bin
+append_path PATH /usr/local/sbin
+# Hope these could be removed someday!
+append_path PATH /usr/local/ymir/perl/bin
+
+# MANPATH
+export MANPATH=""
+append_path MANPATH /usr/share/man
+append_path MANPATH /usr/pkg/man
+append_path MANPATH /usr/local/man
+append_path MANPATH /usr/local/share/man
+
+# INFOPATH
+export INFOPATH=""
+append_path INFOPATH /usr/share/info
+append_path INFOPATH /usr/pkg/info
+append_path INFOPATH /usr/local/info
+append_path INFOPATH /usr/local/share/info
+
+# PKG_CONFIG_PATH
+export PKG_CONFIG_PATH=""
+append_path PKG_CONFIG_PATH /usr/lib/pkgconfig
+append_path PKG_CONFIG_PATH /usr/pkg/lib/pkgconfig
+append_path PKG_CONFIG_PATH /usr/local/lib/pkgconfig
+
+# DYLD_FALLBACK_LIBRARY_PATH (Only for Darwin)
+export DYLD_FALLBACK_LIBRARY_PATH=""
+append_path DYLD_FALLBACK_LIBRARY_PATH /usr/pkg/lib
+
+# Languages
+export LANG="ja_JP.UTF-8"
+export OUTPUT_CHARSET="UTF-8"
+
+# Default Tools
+export EDITOR="vi"
+export PAGER="lv"
+
+# Application Settings
+export LV="-Ia -c"
+export LESS="--quit-if-one-screen"
+export GTK_IM_MODULE=uim
+
+# darcs
+export DARCS_EMAIL="pho@cielonegro.org"
+export DARCS_DONT_ESCAPE_8BIT=1
+
+# uim-fep
+export UIM_FEP=skk
--- /dev/null
+use strict;
+use warnings;
+use Smart::Comments;
+use lib 'tools';
+require 'utils.pl';
+use File::Spec;
+use File::Copy;
+
+sub main {
+ my @args = @_;
+
+ foreach my $arg (@args) {
+ my $rel = File::Spec->abs2rel($arg, $ENV{HOME});
+ my $abs = File::Spec->rel2abs($rel, $ENV{HOME});
+ my $saved = rel2saved($rel);
+
+ print "Copying $abs to $saved...\n";
+ copy($abs, $saved) or die $!;
+ }
+}
+
+main(@ARGV);