Board logo

标题: [问题求助] 求教sh转bat [打印本页]

作者: zf0512305    时间: 2013-4-22 09:18     标题: 求教sh转bat

#! /bin/bash

function install_file {
  file=$1
  group_id=$2
  artifact_id=$3
  version=$4
  
  mvn install:install-file \
      -Dfile=$file \
      -DgroupId=$group_id \
      -DartifactId=$artifact_id \
      -Dversion=$version \
      -Dpackaging=jar \
      -DcreateChecksum=true
}

install_file \
  'lib/ADLParser-2009.jar' \
  'com.bjtxx' \
  'ADLParser' \
  '2009'
  
install_file \
  'lib/apache-commons-id-2009.jar' \
  'com.bjtxx' \
  'apache-commons-id' \
  '2009'

install_file \
  'lib/gwt2swf-0.6.0.jar' \
  'com.bjtxx' \
  'gwt2swf' \
  '0.6.0'

exit

求各位大神帮忙,万分感谢
作者: Batcher    时间: 2013-4-22 10:31

  1. @echo off
  2. call install_file "lib/ADLParser-2009.jar" "com.bjtxx" "ADLParser" "2009"
  3. call install_file "lib/apache-commons-id-2009.jar" "com.bjtxx" "apache-commons-id" "2009"
  4. call install_file "lib/gwt2swf-0.6.0.jar" "com.bjtxx" "gwt2swf" "0.6.0"
  5. :install_file
  6. file=%1
  7. group_id=%2
  8. artifact_id=%3
  9. version=%4
  10. mvn install:install-file  -Dfile=%file% -DgroupId=%group_id% -DartifactId=%artifact_id% -Dversion=%version% -Dpackaging=jar -DcreateChecksum=true
复制代码





欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2