Sha256: cae97e3294ece50dec2627ad619fa601d58ae01b7bc1c976ced30b8ea9514cb6

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

#! /usr/bin/env ruby
# coding: utf-8

require "optparse"
require "fileutils"
require "rubygems"
require "comana"
require "vasputils"

## option analysis
#OPTIONS = {}
#op = OptionParser.new
#op.on("-r", "--reset", "Reset to initial state, remove except for 4 files."){OPTIONS[:reset] = true}
#op.on("-y", "--yes"    , "Answer yes to all questions."                ){OPTIONS[:yes]  = true}
#op.on("-n", "--no"     , "Answer no    to all questions."              ){OPTIONS[:no ]  = true}
#op.parse!(ARGV)

tgts = ARGV
tgts = [ENV['PWD']] if tgts.size == 0

#pp tgts; exit

#def ask
#    print "    Execute? [y/n]: "
#    if OPTIONS[:yes]
#        puts "-y option is indicated."
#        return true
#    end
#
#    if OPTIONS[:no]
#        puts "-n option is indicated."
#        return false
#    end
#
#    /^y/i =~ $stdin.readline
#end

tgts.each do |tgt_dir|
    puts "Directory: #{tgt_dir}"

    # Check tgt_dir is VaspDir?
    begin
        vd = VaspUtils::VaspDir.new(tgt_dir)
    rescue VaspUtils::VaspDir::InitializeError
        puts "  Not VaspDir: #{tgt_dir}"
        next
    end

    vd.reset_init

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vasputils-0.0.12 bin/resetvaspdir