|
@@ -7,7 +7,7 @@ VBOOTSTRAP_DIR=/var/local/vbootstrap
|
|
|
DEFAULT_VERSION=@@DEFAULT_VERSION@@
|
|
|
VERSION=$DEFAULT_VERSION
|
|
|
|
|
|
-Usage(){
|
|
|
+Usage_C(){
|
|
|
cat<<EOF
|
|
|
Usage: $(basename $0) {--version [version]} {--arch [arch]} {--with-compat32} {--build-rpm [src.rpm]|--install-rpm [arch.rpm]|--remove-rpm [package]|--build|--clean}
|
|
|
--version: set [version] (default: ${DEFAULT_VERSION})
|
|
@@ -20,13 +20,13 @@ Usage: $(basename $0) {--version [version]} {--arch [arch]} {--with-compat32} {-
|
|
|
--clean: clean boostrap of [version]
|
|
|
|
|
|
For example,
|
|
|
-* make plain build environment:
|
|
|
+* make a clean/plain build environment on the current archtecture:
|
|
|
$(basename $0) --clean --build
|
|
|
* build source RPM:
|
|
|
$(basename $0) --build-rpm [src.rpm]
|
|
|
-* make Vine Linux 4.2 environment:
|
|
|
+* make a plain build environment for Vine Linux 4.2:
|
|
|
$(basename $0) --version 4.2 --clean --build
|
|
|
-* i386 chroot on x86_64:
|
|
|
+* make a i386 chroot on x86_64:
|
|
|
$(basename $0) --arch i386 --clean --build
|
|
|
* build compat32:
|
|
|
$(basename $0) --arch i386 --with-compat32 --build-rpm [src.rpm]
|
|
@@ -34,12 +34,48 @@ EOF
|
|
|
exit 1
|
|
|
}
|
|
|
|
|
|
+Usage_ja(){
|
|
|
+ Usage_C
|
|
|
+}
|
|
|
+
|
|
|
+Msg_NoSupportVARCH_C(){
|
|
|
+ while read varch; do
|
|
|
+ cat<<EOF
|
|
|
+${varch} is NO support on $(uname -i)
|
|
|
+EOF
|
|
|
+ done
|
|
|
+ exit 1
|
|
|
+}
|
|
|
+
|
|
|
+Msg_NoSupportVARCH_ja(){
|
|
|
+ Msg_NoSupportVARCH_C
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
FLAG_setup_vbootstrap=0
|
|
|
setup-vbootstrap(){
|
|
|
if [ ${FLAG_setup_vbootstrap} -eq 0 ]; then
|
|
|
FLAG_setup_vbootstrap=1
|
|
|
|
|
|
+ ## check a chroot archtecture
|
|
|
+ [ ! -z ${VARCH} ] && \
|
|
|
+ case "${VARCH}" in
|
|
|
+ i386)
|
|
|
+ [ "$(uname -i)" = "ppc" -o "$(uname -i)" = "x86_64" ] && \
|
|
|
+ echo ${VARCH} | Msg_NoSupportVARCH_$LOCALE
|
|
|
+ ;;
|
|
|
+ x86_64)
|
|
|
+ [ "$(uname -i)" = "ppc" ] && \
|
|
|
+ echo ${VARCH} | Msg_NoSupportVARCH_$LOCALE
|
|
|
+ ;;
|
|
|
+ ppc)
|
|
|
+ [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ] && \
|
|
|
+ echo ${VARCH} | Msg_NoSupportVARCH_$LOCALE
|
|
|
+ ;;
|
|
|
+ esac
|
|
|
[ -z ${VARCH} ] && VARCH=$(uname -i)
|
|
|
+
|
|
|
+ ## support for i386 chroot on x86_64 below:
|
|
|
[ "${VARCH}" != "$(uname -i)" ] && VERSION=${VERSION}_${VARCH}
|
|
|
fi
|
|
|
|
|
@@ -141,7 +177,14 @@ RPM_Build(){
|
|
|
}
|
|
|
|
|
|
|
|
|
-[ $# -eq 0 ] && Usage
|
|
|
+##############################################################################
|
|
|
+
|
|
|
+case $LANG in
|
|
|
+ ja*) LOCALE=ja ;;
|
|
|
+ *) LOCALE=C ;;
|
|
|
+esac
|
|
|
+
|
|
|
+[ $# -eq 0 ] && Usage_$LOCALE
|
|
|
while [ $# -gt 0 ]; do
|
|
|
case "$1" in
|
|
|
--version)
|