File indexing completed on 2024-05-19 04:19:14

0001 #!/bin/bash
0002 
0003 # SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0004 #
0005 # SPDX-License-Identifier: BSD-3-Clause
0006 #
0007 # Use this script to clean up your working dir before building the API documentation
0008 
0009 E_ERROR=1
0010 
0011 function usage() {
0012     echo "Usage: $(basename $0) <path>"
0013 }
0014 
0015 if [ $# -ne 1 ]; then
0016     usage
0017     exit $E_ERROR
0018 fi
0019 
0020 if [ -d $1 ]; then
0021     find $1 -type f -name "*BASE*" \
0022         -or -name "*REMOTE*" \
0023         -or -name "*LOCAL*" \
0024         -or -name "*.orig" \
0025         -exec rm {} \;
0026     exit $?
0027 else
0028     echo "'$1' is not a valid directory. Make sure you have permissions to access this location."
0029     exit $E_ERROR
0030 fi
0031