[BACK]Return to fw_install.sh CVS log [TXT][DIR] Up to [local] / openbsd / fw_update

Diff for /openbsd/fw_update/fw_install.sh between version 1.8 and 1.10

version 1.8, 2021/10/16 19:31:13 version 1.10, 2021/10/17 03:05:29
Line 177 
Line 177 
                 echo "Uninstalling $installed"                  echo "Uninstalling $installed"
                 cwd=${PKGDIR}/$installed                  cwd=${PKGDIR}/$installed
   
                 remove="${cwd}/+CONTENTS ${cwd}"                  set -A _remove -- "${cwd}/+CONTENTS" "${cwd}"
   
                 while read c g; do                  while read c g; do
                         case $c in                          case $c in
Line 185 
Line 185 
                           ;;                            ;;
                         @*) continue                          @*) continue
                           ;;                            ;;
                         *)  remove="$cwd/$c $remove"                          *)  set -A _remove -- "$cwd/$c" "${_remove[@]}"
                           ;;                            ;;
                         esac                          esac
                 done < "${PKGDIR}/$installed/+CONTENTS"                  done < "${PKGDIR}/$installed/+CONTENTS"
   
                 for r in $remove ; do                  for _r in "${_remove[@]}"; do
                         if [ -d "$r" ]; then                          if [ -d "$_r" ]; then
                                 # Try hard not to actually remove recursively                                  # Try hard not to actually remove recursively
                                 # without rmdir on the install media.                                  # without rmdir on the install media.
                                 [ "$r/*" = $( echo "$r"/* ) ] && rm -rf "$r"                                  [ "$_r/*" = $( echo "$_r"/* ) ] && rm -rf "$_r"
                         else                          else
                                 rm -f "$r"                                  rm -f "$_r"
                         fi                          fi
                 done                  done
         fi          fi
Line 205 
Line 205 
         # TODO: Or, maybe we save the firmware someplace and make pkg_add reinstall          # TODO: Or, maybe we save the firmware someplace and make pkg_add reinstall
         echo "Installing $_f"          echo "Installing $_f"
         tar -zxphf "$_f" -C /etc "firmware/*"          tar -zxphf "$_f" -C /etc "firmware/*"
         mkdir -p ${PKGDIR}/${firmware%.tgz}/          mkdir -p ${PKGDIR}/${_f%.tgz}/
         tar -zxphf "$_f" -C "${PKGDIR}/${firmware%.tgz}" "+*"          tar -zxphf "$_f" -C "${PKGDIR}/${_f%.tgz}" "+*"
         ed -s "${PKGDIR}/${firmware%.tgz}/+CONTENTS" <<EOL          ed -s "${PKGDIR}/${_f%.tgz}/+CONTENTS" <<EOL
 /^@comment pkgpath/ -1a  /^@comment pkgpath/ -1a
 @option manual-installation  @option manual-installation
 @option firmware  @option firmware

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.10

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>