https://gitlab.com/tezos/tezos
Raw File
Tip revision: 9cc2f24c7838123d92bd9b690ca9cd19e663b305 authored by Anne-Laure on 14 February 2024, 13:25:31 UTC
Apply 1 suggestion(s) to 1 file(s)
Tip revision: 9cc2f24
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" src
  mv "$protocol" src
done
back to top