forked from mariadb-corporation/MaxScale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaxscale-set-change-date
executable file
·62 lines (51 loc) · 1.37 KB
/
maxscale-set-change-date
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
#
# Copyright (c) 2016 MariaDB Corporation Ab
# Copyright (c) 2023 MariaDB plc, Finnish Branch
#
# Use of this software is governed by the Business Source License included
# in the LICENSE.TXT file and at www.mariadb.com/bsl11.
#
# Change Date: 2024-06-03
#
# On the date above, in accordance with the Business Source License, use
# of this software will be governed by version 2 or later of the General
# Public License.
#
SCRIPT="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
MAXSCALE_ROOT=${SCRIPT}/..
DIRS="connectors Documentation etc examples include maxctrl system-test maxutils query_classifier script server maxgui"
function check_dirs
{
for d in ${DIRS}
do
if [ ! -d $d ]
then
echo "error: $d does not exist, seems like DIRS must be updated."
exit 1
fi
done
}
function print_usage_and_exit
{
echo "usage: maxscale-set-change-date change-date"
echo
echo "Example: maxscale-set-change-date 2020-07-09"
echo
echo "This script will set the change date in all files in the"
echo "following directories: $DIRS"
exit 1
}
function main
{
if [ $# -ne 1 ]
then
print_usage_and_exit
fi
cd $MAXSCALE_ROOT
check_dirs
${SCRIPT}/set-change-date -c $1 ${DIRS}
echo
echo "Remember to update the Change Date in the LICENSE and COPYRIGHT files."
}
main $*