Christos Nouskas avatar Christos Nouskas committed 4755a6e

Fix sublevel selection on generic CPUs

Comments (0)

Files changed (1)

 pkgname=('linux-pf')
 true && pkgname=('linux-pf' 'linux-pf-headers')
 pkgver=${_basekernel}.${_pfrel}
-pkgrel=2
+pkgrel=3
 arch=('i686' 'x86_64')
 url="http://pf.natalenko.name/"
 license=('GPL2')
    default)
       ;;
   esac
-  cp -v .config ${startdir}/config.local
+  cp -f .config ${startdir}/config.local
   CPU=`egrep --colour=never "MK8=y|MCORE2=y|MPSC=y|MATOM=y|MPENTIUMII=y|MPENTIUMIII=y|MPENTIUMM=y|MPENTIUM4=y|\
   MK7=y|CONFIG_GENERIC_CPU=y|M686=y|MBARCELONA=y|MBOBCAT=y|MBULLDOZER=y|MPILEDRIVER=y|\
   MCOREI7=y|MCOREI7AVX=y|MCOREAVXI=y|MCOREAVX2=y" ./.config`
   CPU=`sed -e "s/^686$/GENERIC/" <<<$CPU`
   CPU=`sed -e "s/BARCELONA/K8/;s/BOBCAT/K8/;s/BULLDOZER/K8/;s/PILEDRIVER/K8/" <<<$CPU`
   CPU=`sed -e "s/COREAVX2/CORE2/;s/COREAVXI/CORE2/;s/COREI7AVX/CORE2/;s/COREI7/CORE2/" <<<$CPU`
-  cp -v .config ${startdir}/config.$CPU-$CARCH
+  cp -f .config ${startdir}/config.$CPU-$CARCH
 
   # Give option to rename package according to CPU
   echo
-  if [[ "$CPU" != "GENERIC" ]]; then
+  if [[ "$CPU" = "GENERIC" ]]; then
+    msg "Hit <P>     :  to include the patchlevel number in kernver"
+    msg "               (i.e. linux-pf-${_basekernel}.${_pfrel})"
+    msg "Hit <ENTER> :  to remove the patchlevel number from kernver (default)"
+    msg "               (i.e. linux-pf-${_basekernel})"
+    read answer
+    shopt -s nocasematch
+    if [[ "$answer" = "p" ]]; then
+       export _SUBLEVEL=y
+    fi
+  else
     lcpu=`tr '[:upper:]' '[:lower:]' <<< $CPU`
     lcpu=`sed -e "s/entium//" <<<$lcpu`
     echo "=============================================================="
     echo
     msg "Hit <G>     :  to create a generic package named linux-pf"
     msg "Hit <ENTER> :  to create a package named after the selected CPU"
-    echo "                   (linux-pf-${lcpu} - recommended default)"
+    msg "               (linux-pf-${lcpu} - recommended default)"
     echo
     msg "This option affects ONLY the package name. Whether or not the"
     msg "kernel is optimized was determined at the previous config step."
     else
        msg "               (i.e. linux-pf-${lcpu}-${_basekernel}.${_pfrel})"
     fi
-    msg "Hit <ENTER> :  to remove  the patchlevel number from kernver (default)"
+    msg "Hit <ENTER> :  to remove the patchlevel number from kernver (default)"
     if [[ ${_PKGOPT} != "y" ]]; then
        msg "               (i.e. linux-pf-${_basekernel})"
     else
     fi
     read answer
     shopt -s nocasematch
-    if [[ "$answer" = "p" || "$answer" = "s" ]]; then
+    if [[ "$answer" = "p" ]]; then
        export _SUBLEVEL=y
     fi
   fi
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.