|
@ -3823,25 +3823,10 @@ clean_unused_docker_compose() { |
|
|
export -f clean_unused_docker_compose |
|
|
export -f clean_unused_docker_compose |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stdin_get_hash() { |
|
|
|
|
|
local sha |
|
|
|
|
|
sha=$(sha256sum) || return 1 |
|
|
|
|
|
sha=${sha:0:64} |
|
|
|
|
|
echo "$sha" |
|
|
|
|
|
} |
|
|
|
|
|
export -f stdin_get_hash |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
file_get_hash() { |
|
|
|
|
|
stdin_get_hash < "$1" || return 1 |
|
|
|
|
|
} |
|
|
|
|
|
export -f file_get_hash |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docker_compose_store() { |
|
|
docker_compose_store() { |
|
|
local file="$1" sha |
|
|
local file="$1" sha |
|
|
|
|
|
|
|
|
sha=$(file_get_hash "$file") || return 1 |
|
|
|
|
|
|
|
|
sha=$(hash_get 64 < "$file") || return 1 |
|
|
project=$(get_default_project_name) || return 1 |
|
|
project=$(get_default_project_name) || return 1 |
|
|
dst="/var/lib/compose/docker-compose/$sha/$project" |
|
|
dst="/var/lib/compose/docker-compose/$sha/$project" |
|
|
mkdir -p "$dst" || return 1 |
|
|
mkdir -p "$dst" || return 1 |
|
|