9 lines
523 B
Bash
9 lines
523 B
Bash
#!/bin/sh
|
|
|
|
_tarback_plugin_docker_cmd='docker run -i --rm --workdir=/mnt --volume="$1":/mnt/"$1" alpine '
|
|
TARBACK_TAR_CREATE_COMMAND="$_tarback_plugin_docker_cmd "'tar c -C "/mnt/$1" .'
|
|
TARBACK_TAR_EXTRACT_COMMAND="$_tarback_plugin_docker_cmd "'tar x -C "/mnt/$1"'
|
|
|
|
# Can set file to same as directory command since a docker volume is always a directory
|
|
TARBACK_TAR_CREATE_COMMAND_FILE="$_tarback_plugin_docker_cmd "'tar c -C "/mnt/$1" .'
|
|
TARBACK_TAR_EXTRACT_COMMAND_FILE="$_tarback_plugin_docker_cmd "'tar x -C "/mnt/$1"'
|