Changeset 5451eae for LFS/lfs.xsl
- Timestamp:
- 07/15/2019 08:06:35 PM (5 years ago)
- Branches:
- ablfs-more, legacy, trunk
- Children:
- 7933ed7
- Parents:
- 3b14992
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LFS/lfs.xsl
r3b14992 r5451eae 172 172 </xsl:if> 173 173 <xsl:text>
</xsl:text> 174 <xsl:if test="sect2[@role='installation']"> 175 <xsl:call-template name="start-script"> 176 <xsl:with-param name="order" select="$order"/> 177 </xsl:call-template> 178 </xsl:if> 174 <xsl:call-template name="start-script"> 175 <xsl:with-param name="order" select="$order"/> 176 </xsl:call-template> 179 177 <xsl:apply-templates select="sect2[not(@revision) or 180 178 @revision=$revision] | … … 198 196 </xsl:if> 199 197 <xsl:text>echo -e "\n\nTotalseconds: $SECONDS\n"
</xsl:text> 200 <xsl:if test="sect2[@role='installation']"> 201 <xsl:call-template name="end-script"/> 202 </xsl:if> 198 <xsl:call-template name="end-script"/> 203 199 <xsl:text>exit
</xsl:text> 204 200 </exsl:document> … … 1152 1148 <xsl:template name="start-script"> 1153 1149 <xsl:param name="order" select="'073'"/> 1154 <!-- get the location of the system root -->1155 1150 <xsl:text> 1151 <!-- save the timer, so that unpacking, and du is not counted --> 1152 PREV_SEC=${SECONDS} 1153 <!-- get the location of the system root --> 1156 1154 if [ -h /tools ]; then 1157 1155 ROOT=$(dirname $(readlink /tools))/ … … 1159 1157 ROOT=/ 1160 1158 fi 1161 SRC_DIR=${ROOT}sources1162 <!-- save the timer, so that unpacking, and du is not counted -->1163 PREV_SEC=${SECONDS}1164 <!-- Set variables, for use by the Makefile and package manager -->1165 VERSION=</xsl:text><!-- needed for Makefile, and may be used in PackInstall-->1166 <xsl:copy-of select=".//sect1info/productnumber/text()"/>1167 <xsl:text>1168 PKG_DEST=${SRC_DIR}/</xsl:text>1169 <xsl:copy-of select="$order"/>1170 <xsl:text>-</xsl:text>1171 <xsl:copy-of select=".//sect1info/productname/text()"/>1172 <xsl:text>1173 <!-- Get the tarball name from sect1info -->1174 PACKAGE=</xsl:text>1175 <xsl:call-template name="basename">1176 <xsl:with-param name="path" select=".//sect1info/address/text()"/>1177 </xsl:call-template>1178 <xsl:text>1179 1159 SCRIPT_ROOT=</xsl:text> 1180 1160 <xsl:copy-of select="$script-root"/> 1181 1161 <xsl:text> 1182 1162 </xsl:text> 1183 <xsl:if test = "( ../@id != 'chapter-temporary-tools' or 1163 <xsl:if test="sect2[@role='installation']"> 1164 <xsl:text> 1165 SRC_DIR=${ROOT}sources 1166 <!-- Set variables, for use by the Makefile and package manager --> 1167 VERSION=</xsl:text><!-- needed for Makefile, and may be used in PackInstall--> 1168 <xsl:copy-of select=".//sect1info/productnumber/text()"/> 1169 <xsl:text> 1170 PKG_DEST=${SRC_DIR}/</xsl:text> 1171 <xsl:copy-of select="$order"/> 1172 <xsl:text>-</xsl:text> 1173 <xsl:copy-of select=".//sect1info/productname/text()"/> 1174 <xsl:text> 1175 <!-- Get the tarball name from sect1info --> 1176 PACKAGE=</xsl:text> 1177 <xsl:call-template name="basename"> 1178 <xsl:with-param name="path" select=".//sect1info/address/text()"/> 1179 </xsl:call-template> 1180 <xsl:if test = "( ../@id != 'chapter-temporary-tools' or 1184 1181 starts-with(@id,'ch-system') ) and $pkgmngt = 'y'"> 1185 <xsl:text>1182 <xsl:text> 1186 1183 source ${ROOT}${SCRIPT_ROOT}/packInstall.sh 1187 1184 export -f packInstall</xsl:text> 1188 <xsl:if test="$wrap-install='y'">1189 <xsl:text>1185 <xsl:if test="$wrap-install='y'"> 1186 <xsl:text> 1190 1187 export -f wrapInstall 1191 1188 </xsl:text> 1189 </xsl:if> 1192 1190 </xsl:if> 1193 </xsl:if>1194 1191 <!-- Get the build directory name and clean remnants of previous attempts --> 1195 <xsl:text>1192 <xsl:text> 1196 1193 cd $SRC_DIR 1197 1194 PKGDIR=$(tar -tf $PACKAGE | head -n1 | sed 's@^./@@;s@/.*@@') … … 1200 1197 if [ -d "$PKGDIR" ]; then rm -rf $PKGDIR; fi 1201 1198 if [ -d "${PKGDIR%-*}-build" ]; then rm -rf ${PKGDIR%-*}-build; fi 1202 1203 echo "KB: $(du -skx --exclude=lost+found --exclude=/var/lib --exclude=$SCRIPT_ROOT $ROOT)" 1199 </xsl:text> 1200 </xsl:if> 1201 <xsl:text> 1202 echo "KB: $(du -skx --exclude=lost+found --exclude=var/lib --exclude=$SCRIPT_ROOT $ROOT)" 1203 </xsl:text> 1204 <xsl:if test="sect2[@role='installation']"> 1205 <xsl:text> 1204 1206 <!-- At last unpack and change directory --> 1205 1207 tar -xf $PACKAGE 1206 1208 cd $PKGDIR 1207 SECONDS=${PREV_SEC} 1209 </xsl:text> 1210 </xsl:if> 1211 <xsl:text>SECONDS=${PREV_SEC} 1208 1212 1209 1213 # Start of LFS book script … … 1215 1219 # End of LFS book script 1216 1220 1217 echo "KB: $(du -skx --exclude=lost+found --exclude=/var/lib --exclude=$SCRIPT_ROOT $ROOT)" 1218 cd $SRC_DIR 1221 echo "KB: $(du -skx --exclude=lost+found --exclude=var/lib --exclude=$SCRIPT_ROOT $ROOT)" 1222 </xsl:text> 1223 <xsl:if test="sect2[@role='installation']"> 1224 <xsl:text>cd $SRC_DIR 1219 1225 rm -rf $PKGDIR 1220 1226 if [ -d "${PKGDIR%-*}-build" ]; then rm -rf ${PKGDIR%-*}-build; fi 1221 1227 </xsl:text> 1228 </xsl:if> 1222 1229 </xsl:template> 1223 1230
Note:
See TracChangeset
for help on using the changeset viewer.