buildtar (597473720f4dc69749542bfcfed4a927a43d935e) | buildtar (af7db99a1caf29b05a81bfee596b9d2778eb7e39) |
---|---|
1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0 3 4# | 1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0 3 4# |
5# buildtar 0.0.4 | 5# buildtar 0.0.5 |
6# 7# (C) 2004-2006 by Jan-Benedict Glaw <jbglaw@lug-owl.de> 8# 9# This script is used to compile a tarball from the currently 10# prepared kernel. Based upon the builddeb script from 11# Wichert Akkerman <wichert@wiggy.net>. 12# 13 --- 5 unchanged lines hidden (view full) --- 19tmpdir="${objtree}/tar-install" 20tarball="${objtree}/linux-${KERNELRELEASE}-${ARCH}.tar" 21 22 23# 24# Figure out how to compress, if requested at all 25# 26case "${1}" in | 6# 7# (C) 2004-2006 by Jan-Benedict Glaw <jbglaw@lug-owl.de> 8# 9# This script is used to compile a tarball from the currently 10# prepared kernel. Based upon the builddeb script from 11# Wichert Akkerman <wichert@wiggy.net>. 12# 13 --- 5 unchanged lines hidden (view full) --- 19tmpdir="${objtree}/tar-install" 20tarball="${objtree}/linux-${KERNELRELEASE}-${ARCH}.tar" 21 22 23# 24# Figure out how to compress, if requested at all 25# 26case "${1}" in |
27 tar-pkg) | 27 dir-pkg|tar-pkg) |
28 opts= 29 ;; 30 targz-pkg) 31 opts=--gzip 32 tarball=${tarball}.gz 33 ;; 34 tarbz2-pkg) 35 opts=--bzip2 --- 84 unchanged lines hidden (view full) --- 120 echo "" >&2 121 echo "Your architecture did not define any architecture-dependent files" >&2 122 echo "to be placed into the tarball. Please add those to ${0} ..." >&2 123 echo "" >&2 124 sleep 5 125 ;; 126esac 127 | 28 opts= 29 ;; 30 targz-pkg) 31 opts=--gzip 32 tarball=${tarball}.gz 33 ;; 34 tarbz2-pkg) 35 opts=--bzip2 --- 84 unchanged lines hidden (view full) --- 120 echo "" >&2 121 echo "Your architecture did not define any architecture-dependent files" >&2 122 echo "to be placed into the tarball. Please add those to ${0} ..." >&2 123 echo "" >&2 124 sleep 5 125 ;; 126esac 127 |
128if [ "${1}" = dir-pkg ]; then 129 echo "Kernel tree successfully created in $tmpdir" 130 exit 0 131fi |
|
128 129# 130# Create the tarball 131# 132if tar --owner=root --group=root --help >/dev/null 2>&1; then 133 opts="$opts --owner=root --group=root" 134fi 135 136tar cf $tarball -C $tmpdir $opts $dirs 137 138echo "Tarball successfully created in $tarball" 139 140exit 0 | 132 133# 134# Create the tarball 135# 136if tar --owner=root --group=root --help >/dev/null 2>&1; then 137 opts="$opts --owner=root --group=root" 138fi 139 140tar cf $tarball -C $tmpdir $opts $dirs 141 142echo "Tarball successfully created in $tarball" 143 144exit 0 |