FooDownunder

Clone Eve Directory for Multiple Launcers

Jun 23rd, 2014
298
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. set -x
  3.  
  4. function fnMakeDest(){
  5.     destdir=$1
  6.  
  7.     if [ -d $destdir ]; then
  8.         echo $destdir already exists
  9.         exit
  10.     fi
  11.  
  12.     mkdir $destdir
  13.  
  14.     for file in EVE/*
  15.     do
  16.         if [ -f $file ]; then
  17.             ln $file $destdir/
  18.         fi
  19.         if [ -d $file ]; then
  20.             lDirName=$(basename $file)
  21.             lDirParent=$(dirname $file)
  22.             if [ $lDirName = launcher ]; then
  23.                 cp -R $file $destdir/
  24.             else
  25.                 cmd.exe /c mklink /j $destdir\\$lDirName $lDirParent\\$lDirName
  26.             fi
  27.  
  28.         fi
  29.  
  30.     done
  31.  
  32. }
  33.  
  34.  
  35. fnMakeDest EVE2
  36. fnMakeDest EVE3
  37. fnMakeDest EVE4
RAW Paste Data