72 lines
1.5 KiB
Bash
Executable File
72 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
#############################################################################
|
|
# Copyright (c) 2019-2021 University of Exeter, UK
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#############################################################################
|
|
|
|
set -e
|
|
|
|
#SM=${SCALE_MAMBA:-../SCALE-MAMBA}
|
|
TEMPLATE=template/mpc
|
|
#SM_DEPENDENCIES="Player.x Setup.x compile.py Compiler Circuits/Bristol"
|
|
print_help()
|
|
{
|
|
echo "Usage: update-template"
|
|
echo ""
|
|
echo "Run ..."
|
|
echo ""
|
|
echo " --remove, -r remove/uninstall SCALE-MAMBA dependencies"
|
|
echo " --help, -h display this help message"
|
|
}
|
|
|
|
update_sm()
|
|
{
|
|
mkdir -p $TEMPLATE
|
|
for i in "$TEMPLATE"/*.x; do
|
|
echo "Stripping $i ..."
|
|
strip $i
|
|
done
|
|
}
|
|
|
|
remove_sm()
|
|
{
|
|
rm -r $TEMPLATE
|
|
}
|
|
|
|
remove="false"
|
|
|
|
while [ $# -gt 0 ]
|
|
do
|
|
case "$1" in
|
|
--help|-h)
|
|
print_help
|
|
exit 0;;
|
|
|
|
--remove|-r)
|
|
remove='true';;
|
|
*) print_help
|
|
exit 0;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
update_sm
|
|
|
|
exit 0;
|
|
|
|
|
|
|