copy.sh 292 B

12345678910
  1. #! /bin/bash -ex
  2. # This script copies the contents of the "scripts" folder into a docker
  3. # container using tar/untar the container id must be passed.
  4. DIRNAME=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
  5. docker exec $1 mkdir -p $2
  6. cd $DIRNAME
  7. tar -cv * | docker exec -i $1 tar -x -C $2