reformatted code

This commit is contained in:
ndwarshuis 2018-11-10 16:24:06 -05:00
parent 6a3b0277bf
commit 369cc68c2a
1 changed files with 7 additions and 2 deletions

View File

@ -45,14 +45,16 @@ done
# pull old config if it exists and is not the most recent # pull old config if it exists and is not the most recent
if [ -e "$BUILDFILE" ]; then if [ -e "$BUILDFILE" ]; then
echo "checking for old config file" echo "checking for old config file"
# kver=$(get_from_buildfile "$BUILDFILE" "_srcname")
source "$BUILDFILE" # get pkgver source "$BUILDFILE" # get pkgver
oldconf="$PKG_DIR/src/linux-$pkgver/.config" oldconf="$PKG_DIR/src/linux-$pkgver/.config"
## this file does not always exist?
if [ -e "$oldconf" ]; then if [ -e "$oldconf" ]; then
echo "found old config" echo "found old config"
oldsum=$(md5sum "$oldconf" | awk '{print $1}') oldsum=$(md5sum "$oldconf" | awk '{print $1}')
newsum=$(md5sum $(get_latest_config) | awk '{print $1}') newsum=$(md5sum $(get_latest_config) | awk '{print $1}')
if [ "$oldsum" != "$newsum" ]; then if [ "$oldsum" != "$newsum" ]; then
echo "copying old config to $CONFHIST_DIR" echo "copying old config to $CONFHIST_DIR"
cp "$oldconf" "$CONFHIST_DIR/.config-$(date +%Y%m%d%H%M)" cp "$oldconf" "$CONFHIST_DIR/.config-$(date +%Y%m%d%H%M)"
@ -64,12 +66,15 @@ fi
if [ -z "$OLD_PKG" ]; then if [ -z "$OLD_PKG" ]; then
echo downloading new package echo downloading new package
rm -rf $PKG_DIR rm -rf $PKG_DIR
curl -O "$PKG_URL" curl -O "$PKG_URL"
tar xzf linux-ck.tar.gz tar xzf linux-ck.tar.gz
latest_conf=$(get_latest_config) latest_conf=$(get_latest_config)
echo "copying conf: $latest_conf" echo "copying conf: $latest_conf"
cp "$latest_conf" "$PKG_DIR/config" cp "$latest_conf" "$PKG_DIR/config"
updpkgsums "$BUILDFILE" updpkgsums "$BUILDFILE"
fi fi