You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
539 B

#!/bin/bash
# Quit if any command produces an error.
set -e
# Parse variables
MAJOR_VERSION=$1
: ${MAJOR_VERSION:?
"You must specify the major version of the API to be archived."
"Usage ./archive_chre_api.sh <major_version> <minor_version>"}
MINOR_VERSION=$2
: ${MINOR_VERSION:?
"You must specify the minor version of the API to be archived."
"Usage ./archive_chre_api.sh <major_version> <minor_version>"}
DIRECTORY=v${MAJOR_VERSION}_${MINOR_VERSION}
mkdir legacy/$DIRECTORY
cp -r include/chre_api/* legacy/$DIRECTORY