-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsync_config_files
executable file
·52 lines (45 loc) · 1.66 KB
/
sync_config_files
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
#!/bin/bash
#-----------------------------------------------------------------------bl-
#--------------------------------------------------------------------------
#
# LosF - a Linux operating system Framework for HPC clusters
#
# Copyright (C) 2007-2019 Karl W. Schulz <[email protected]>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the Version 2 GNU General
# Public License as published by the Free Software Foundation.
#
# These programs are distributed in the hope that they will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc. 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA
#
#-----------------------------------------------------------------------el-
# Shell wrapper for file syncing utility.
#--------------------------------------------------------------------------
# determine path to binary
[[ -L $0 ]] && binary=`readlink -f $0` || binary=$0
# disable colors for non-interactive shell
[[ ! -t 1 ]] && export ANSI_COLORS_DISABLED=1
export TOP_DIR=`echo $( (cd -P $(dirname $binary) && pwd) )`
if [ -z $PERL5LIB ];then
export PERL5LIB=$TOP_DIR/utils
else
export PERL5LIB=$TOP_DIR/utils:$PERL5LIB
fi
if [ $# -eq 0 ];then
$TOP_DIR/utils/sync_config.pl
elif [ $# -eq 1 ];then
$TOP_DIR/utils/sync_named_file.pl $1
else
echo " "
echo "Usage: sync_config_files <individual-file>"
echo " "
exit 1
fi