conf/jcs, make, scripts: Rename jw-build's get_os.sh to get-os.sh
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
763d18f350
commit
3961d47f07
7 changed files with 6 additions and 6 deletions
|
|
@ -1,4 +1,4 @@
|
|||
jcs_dir=$HOME/local/src/jw.dev/conf/`hostname -d`/`hostname -s`/`/opt/jw-build/bin/get_os.sh`
|
||||
jcs_dir=$HOME/local/src/jw.dev/conf/`hostname -d`/`hostname -s`/`/opt/jw-build/bin/get-os.sh`
|
||||
jcs_owner=root
|
||||
jcs_group=root
|
||||
jcs_log_dir=$jcs_dir/log
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ ifeq ($(PROJECT),)
|
|||
PROJECT := $(patsubst $(FLAVOUR_PREFIX)%,%,$(notdir $(shell cd $(TOPDIR); pwd | $(SED) 's/.*\///; s/-[0-9].*//')))
|
||||
endif
|
||||
|
||||
OS ?= $(shell sh $(MOD_SCRIPT_DIR)/get_os.sh)
|
||||
OS ?= $(shell sh $(MOD_SCRIPT_DIR)/get-os.sh)
|
||||
|
||||
CREATE_DEVEL ?= true
|
||||
#COMPILER_SUITE ?= clang
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# === variable definitions
|
||||
GET_OS_SH = sh $(MOD_SCRIPT_DIR)/get_os.sh
|
||||
GET_OS_SH = sh $(MOD_SCRIPT_DIR)/get-os.sh
|
||||
GENERATE_SELECTION = sh $(MOD_SCRIPT_DIR)/generate_selection.sh
|
||||
UPLOAD_SH = sh $(MOD_SCRIPT_DIR)/upload.sh
|
||||
|
||||
|
|
|
|||
114
scripts/get-os.sh
Executable file
114
scripts/get-os.sh
Executable file
|
|
@ -0,0 +1,114 @@
|
|||
#!/bin/sh
|
||||
########################################################################
|
||||
# #
|
||||
# generic utiltiy modules #
|
||||
# (c) 2001 jannet it services #
|
||||
# contact@jannet.de #
|
||||
# #
|
||||
# $Id$
|
||||
# #
|
||||
# This program is free software; permission to use, copy, modify, #
|
||||
# distribute, and sell this software and its documentation under the #
|
||||
# terms of the GNU Public license as published by the Free Software #
|
||||
# Foundation, either version 2 or any later version of the license, is #
|
||||
# hereby granted without fee, provided that (i) the above copyright #
|
||||
# notices and this permission notice appear in all copies of the #
|
||||
# software and related documentation, and (ii) the name of JanNet may #
|
||||
# not be used in any advertising or publicity relating to the software #
|
||||
# without the specific, prior written permission of JanNet. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, but #
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- #
|
||||
# TABILITY 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 program; if not, write to the Free Software Founda- #
|
||||
# tion, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #
|
||||
# #
|
||||
########################################################################
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "
|
||||
usage: $myname [-h]
|
||||
$myname [-v]
|
||||
$myname [-V]
|
||||
"
|
||||
[ "$1" ] && exit $1
|
||||
}
|
||||
|
||||
cmd_name_version()
|
||||
{
|
||||
if [ -r /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
if [ "$opt_verbose" ]; then
|
||||
echo $NAME $VERSION
|
||||
else
|
||||
if grep -qi tumbleweed /etc/os-release; then
|
||||
echo suse-tumbleweed
|
||||
else
|
||||
[ "$ID_LIKE" ] && ID=$ID_LIKE
|
||||
echo $ID-$VERSION_ID | sed 's/opensuse/suse/g'
|
||||
fi
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -e /etc/SuSE-release ]; then
|
||||
if [ "$opt_verbose" ]; then
|
||||
head -1 /etc/SuSE-release
|
||||
else
|
||||
VERSION="`grep VERSION /etc/SuSE-release | sed -e 's/.*=//; s/ //g'`"
|
||||
echo suse-$VERSION
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$opt_verbose" ]; then
|
||||
uname -a
|
||||
else
|
||||
uname -r
|
||||
fi
|
||||
}
|
||||
|
||||
cmd_version()
|
||||
{
|
||||
cmd_name_version | cut -d- -f2-
|
||||
}
|
||||
|
||||
cmd_name()
|
||||
{
|
||||
cmd_name_version | cut -d- -f1
|
||||
}
|
||||
|
||||
# --- here we go
|
||||
|
||||
myname=`basename $0`
|
||||
release_file=/etc/os-release
|
||||
cmd=name_version
|
||||
|
||||
set -- `getopt 'hvV' $*`
|
||||
while [ "$1" != -- ] ; do
|
||||
case "$1" in
|
||||
-h)
|
||||
usage 0
|
||||
;;
|
||||
-v)
|
||||
opt_verbose=1;
|
||||
;;
|
||||
-V)
|
||||
cmd=version
|
||||
;;
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
shift
|
||||
|
||||
[ "$1" ] && cmd="$1"
|
||||
|
||||
eval cmd_$cmd
|
||||
|
||||
|
|
@ -2037,7 +2037,7 @@ JNT_JCSDIR=/tmp
|
|||
--<<<-- jcs.conf.oldstyle --
|
||||
|
||||
-->>>-- jcs.conf --
|
||||
jcs_dir=$HOME/local/src/jw.dev/conf/`hostname -d`/`hostname -s`/`/opt/jw-build/bin/get_os.sh`
|
||||
jcs_dir=$HOME/local/src/jw.dev/conf/`hostname -d`/`hostname -s`/`/opt/jw-build/bin/get-os.sh`
|
||||
jcs_owner=root
|
||||
jcs_group=root
|
||||
jcs_log_dir=$jcs_dir/log
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ fatal()
|
|||
|
||||
os()
|
||||
{
|
||||
/bin/bash $MOD_SCRIPT_DIR/get_os.sh
|
||||
/bin/bash $MOD_SCRIPT_DIR/get-os.sh
|
||||
}
|
||||
|
||||
scm_commit()
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ def remove_duplicates(seq):
|
|||
|
||||
def get_os(args = ""):
|
||||
for d in [ projs_root + '/jw-build/scripts', '/opt/jw-build/bin' ]:
|
||||
script = d + '/get_os.sh'
|
||||
script = d + '/get-os.sh'
|
||||
if isfile(script):
|
||||
cmd = '/bin/bash ' + script
|
||||
if args:
|
||||
|
|
|
|||
Loading…
Reference in a new issue