Radix cross Linux

The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines

452 Commits   2 Branches   1 Tag
Index: list-zones
===================================================================
--- list-zones	(nonexistent)
+++ list-zones	(revision 5)
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+path=$1
+p01=$2
+
+if [ -z "$path" -a -z "$p01" ] ; then
+  echo ""
+  echo "Usage: `basename $0` PATH output-file"
+  echo ""
+  exit 1
+fi
+
+ls 1> /dev/null 2> $p01
+
+( cd $path
+  find . -type f | xargs file | grep "timezone data" | cut -f 1 -d : | sort | while read zone ; do
+    if [ "`dirname $zone`" != "." ] ; then
+      line="\"`echo "$zone" | sed "s,\./,,"`\" \" \" \\\\"
+      echo "$line" >> $p01
+    fi
+  done
+
+  find . -type f | xargs file | grep "timezone data" | cut -f 1 -d : | sort | while read zone ; do
+    if [ "`dirname $zone`" == "." ] ; then
+      line="\"`echo "$zone" | sed "s,\./,,"`\" \" \" \\\\"
+      echo "$line" >> $p01
+    fi
+  done
+)

Property changes on: list-zones
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: part-00
===================================================================
--- part-00	(nonexistent)
+++ part-00	(revision 5)
@@ -0,0 +1,164 @@
+#!/bin/sh
+
+# program name:
+program=`basename $0`
+
+# 16 = root path has not specified arter --root option
+# 91 = root path not correct
+# 92 = Cannot create '/tmp/...' directory
+EXITSTATUS=0
+
+CWD=`pwd`
+
+umask 022
+if [ ! -z "$TMPDIR" ] ; then mkdir -p $TMPDIR ; fi
+TMP=$(mkdir -p /tmp/radix && mktemp -d -p /tmp/radix $program.XXXXXXXX) || { echo "Cannot create '/tmp/...' directory" ; exit 92; }
+trap "rm -rf $TMP" EXIT
+
+
+TARGET_ROOT_PATH=
+
+usage() {
+ cat << EOF
+
+Usage: $program [options]
+
+$program - Radix Linux timezone configuration utility.
+
+options:
+   --root <DIR>   - Configure timezone someplace else, like <DIR>.
+
+EOF
+}
+
+
+check_abs_paths()
+{
+  if [ ! -z "$TARGET_ROOT_PATH" ] ; then
+    if [[ ${TARGET_ROOT_PATH:0:1} != "/" ]] ; then
+      TARGET_ROOT_PATH=$CWD/$TARGET_ROOT_PATH
+    fi
+    TARGET_ROOT_PATH="$(echo "$TARGET_ROOT_PATH" | sed -e "s/\/$//")/"
+  fi
+}
+
+#
+# Parse options:
+#
+while [ 0 ]; do
+  if [ "$1" = "-h" -o "$1" = "--help" ]; then
+    usage
+    exit 0
+  elif [ "$1" = "--root" ]; then
+    if [ "$2" = "" ]; then
+      usage
+      echo "ERROR: Target ROOT directory has not specified. Check --root option."
+      EXITSTATUS=17
+      exit $EXITSTATUS
+    fi
+    TARGET_ROOT_PATH="$2"
+    shift 2
+  else
+    break
+  fi
+done
+
+check_abs_paths
+
+if [ -z "$TARGET_ROOT_PATH" ] ; then
+  TARGET_ROOT_PATH="/"
+fi
+
+if [ ! -d $TARGET_ROOT_PATH ] ; then
+  echo "ERROR: Target ROOT path specified but not correct."
+  EXITSTATUS=91
+  exit $EXITSTATUS
+fi
+
+: ${DIALOG=dialog}
+: ${DIALOGRC=${TARGET_ROOT_PATH}etc/dialogrc}
+
+#
+# The hardware clock configuration file:
+#
+HWCLOCK_CONF=${TARGET_ROOT_PATH}etc/hardwareclock
+
+#
+# setzone( $TIMEZONE )
+#
+# This function accepts a time zone as the only parameter
+# and sets it as the default system time zone.
+#
+setzone()
+{
+  TZ=$1
+
+  cd ${TARGET_ROOT_PATH}etc
+  if [ -r ${TARGET_ROOT_PATH}usr/share/zoneinfo/$TZ -o \
+       -L ${TARGET_ROOT_PATH}usr/share/zoneinfo/$TZ    ]; then
+      ln -sf ../usr/share/zoneinfo/$TZ localtime-copied-from
+      rm -f localtime
+      cd ..
+      cp etc/localtime-copied-from etc/localtime
+   fi
+}
+
+#
+# writeconf( $CLOCK_SET_TO )
+#
+# Writes out $HWCLOCK_CONF that tells rc.S how the hardware clock value is stored.
+#
+writeconf()
+{
+   echo "#"                                               > $HWCLOCK_CONF
+   echo "# /etc/hardwareclock"                           >> $HWCLOCK_CONF
+   echo "#"                                              >> $HWCLOCK_CONF
+   echo "# Tells how the hardware clock time is stored." >> $HWCLOCK_CONF
+   echo "# You should run timeconfig to edit this file." >> $HWCLOCK_CONF
+   echo ""                                               >> $HWCLOCK_CONF
+   echo $1 >> $HWCLOCK_CONF
+}
+
+#
+# Ask the user if the hardware clock is set for UTC/GMT
+#
+cat > $TMP/menu-utc$$ << EOF
+--colors \\
+--backtitle "\Z7Radix\Zn \Z1cross\Zn\Z7 Linux\Zn" \\
+--title " \Z4\ZbSet Hardware Clock\ZB\Zn " \\
+--menu "\\n\\
+ Is the hardware clock set to Coordinated Universal Time (UTC/GMT)?\\n\\
+ If it is, select YES here.\\n\\n\\
+ If the hardware clock is set to the current local time (this is how\\n\\
+ most PCs are set up), then say NO here.\\n\\n\\
+ If you are not sure what this is, you should answer NO here.\\n\\
+" 16 74 2 \\
+"NO" "Hardware clock is set to local time" \\
+"YES" "Hardware clock is set to UTC" \\
+EOF
+
+$DIALOG --file $TMP/menu-utc$$ 2> $TMP/utc$$
+if [ $? = 1 -o $? = 255 ]; then
+  rm -f $TMP/utc$$
+  rm -f $TMP/menu-utc$$
+  exit
+fi
+if [ "`cat $TMP/utc$$`" = "YES" ]; then
+  # yes, the hardware clock is UTC
+  writeconf "UTC"
+else # must be NO
+  writeconf "localtime"
+fi
+rm -f $TMP/utc$$
+rm -f $TMP/menu-utc$$
+
+#
+# Ask the user which timezone is preffered
+#
+cat > $TMP/menu-tz$$ << EOF
+--colors \\
+--backtitle "\Z7Radix\Zn \Z1cross\Zn\Z7 Linux\Zn" \\
+--title " \Z4\ZbTimezone Configuration\ZB\Zn " \\
+--menu "\\n\\
+ Please select one of the following timezones for your machine:\\n\\
+" 22 74 14 \\
Index: part-02
===================================================================
--- part-02	(nonexistent)
+++ part-02	(revision 5)
@@ -0,0 +1,16 @@
+EOF
+
+$DIALOG --file $TMP/menu-tz$$ 2> $TMP/tz$$
+ret=$?
+if [ $ret -eq 1 -o $ret -eq 255 ]; then
+  rm -f $TMP/tz$$
+  rm -f $TMP/menu-tz$$
+  exit
+fi
+
+TIMEZONE="`cat $TMP/tz$$`"
+rm -f $TMP/tz$$
+rm -f $TMP/menu-tz$$
+
+setzone $TIMEZONE
+exit
Index: .
===================================================================
--- .	(nonexistent)
+++ .	(revision 5)

Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~