https://gitlab.com/tezos/tezos
Raw File
Tip revision: 62e16336d4b5f7d074d913c3efaddd721ad46301 authored by Thomas Letan on 07 August 2023, 16:05:48 UTC
Misc: Move protocols in their own top-level directory
Tip revision: 62e1633
restore-old-protocols.sh
#!/bin/sh

set -eu

usage() {
    echo "Usage: $0 <protocol-trashbin>"
    echo "Restores the protocols stored in <protocol-trashbin>."
    echo "This reverses the effect of 'scripts/remove-old-protocols.sh <protocol-trashbin>'"
    exit 1
}

trash_bin=""
if [ -n "${1:-}" ] && [ "${1:-}" != "--help" ]; then
    trash_bin=$1
else
    usage
fi

for protocol in "$trash_bin"/*; do
    echo mv "$protocol" protocols
    mv "$protocol" protocols
done
back to top