Revision ad7447b3e726de653f2c77f4db63fb0c383dc555 authored by Francesc Domene on 04 July 2019, 13:50:10 UTC, committed by Néstor Subirón on 09 July 2019, 17:18:46 UTC
1 parent a847f8a
Raw File
ImportAssets.sh
#! /bin/bash

# ==============================================================================
# -- Parse arguments -----------------------------------------------------------
# ==============================================================================

DOC_STRING="Unpack and copy over CarlaUE4's Exported Assets"

USAGE_STRING="Usage: $0 [-h|--help] [-d|--dir] <outdir>"

OUTPUT_DIRECTORY=""

OPTS=`getopt -o h,d:: --long help,dir:: -n 'parse-options' -- "$@"`

if [ $? != 0 ] ; then echo "$USAGE_STRING" ; exit 2; fi

eval set -- "$OPTS"

while true; do
  case "$1" in
    --dir )
      OUTPUT_DIRECTORY="$2"
      shift ;;
    -h | --help )
      echo "$DOC_STRING"
      echo "$USAGE_STRING"
      exit 1
      ;;
    * )
      break ;;
  esac
done

#Tar.gz the stuff
for filepath in `find ExportedAssets/ -type f -name "*.tar.gz"`; do
  tar --keep-newer-files -xvf ${filepath}
done

back to top