Diff for /freem/scripts/fmd-pkg-rpm between versions 1.3 and 1.4

version 1.3, 2025/04/07 13:02:51 version 1.4, 2025/04/07 21:50:11
Line 25 Line 25
 #   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.  #   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
 #  #
 #   $Log$  #   $Log$
   #   Revision 1.4  2025/04/07 21:50:11  snw
   #   Fix bug in fmd-pkg-rpm
   #
 #   Revision 1.3  2025/04/07 13:02:51  snw  #   Revision 1.3  2025/04/07 13:02:51  snw
 #   Initial working version of fmd-pkg-rpm  #   Initial working version of fmd-pkg-rpm
 #  #
Line 97  else Line 100  else
     echo "[OK]"      echo "[OK]"
 fi  fi
   
 echo -n "${PGM}:  cleaning up..."  if [[ "${ORIG_TARBALL}" != "${NEW_TARBALL}" ]]
 rm -rf "${OLD_DIR}" "${NEW_DIR}" "${NEW_TARBALL}" &>> /dev/null  
 if [[ $? != 0 ]]  
 then  then
     echo "[FAIL]"      RENAME=1
     exit 1  
 else  else
     echo "[OK]"      RENAME=0
 fi  fi
   
 echo -n "${PGM}:  decompressing source tarball..."  if [[ $RENAME == 1 ]]
 tar xzf "${ORIG_TARBALL}"  
 if [[ $? != 0 ]]  
 then  then
     echo "[FAIL]"      echo -n "${PGM}:  cleaning up..."
     exit 1      rm -rf "${OLD_DIR}" "${NEW_DIR}" "${NEW_TARBALL}" &>> /dev/null
 else      if [[ $? != 0 ]]
     echo "[OK]"      then
           echo "[FAIL]"
           exit 1
       else
           echo "[OK]"
       fi    
 fi  fi
   
 echo -n "${PGM}:  renaming ${ORIG_DIR} -> ${NEW_DIR}..."  echo -n "${PGM}:  decompressing source tarball..."
 mv "${ORIG_DIR}" "${NEW_DIR}" &>> /dev/null  tar xzf "${ORIG_TARBALL}"
 if [[ $? != 0 ]]  if [[ $? != 0 ]]
 then  then
     echo "[FAIL]"      echo "[FAIL]"
Line 127  else Line 130  else
     echo "[OK]"      echo "[OK]"
 fi  fi
   
 echo -n "${PGM}:  generating ${NEW_TARBALL}..."  if [[ $RENAME == 1 ]]
 tar cf "${NEW_TARBALL}" "${NEW_DIR}" &>> /dev/null  
 if [[ $? != 0 ]]  
 then  then
     echo "[FAIL]"      echo -n "${PGM}:  renaming ${ORIG_DIR} -> ${NEW_DIR}..."
     exit 1      mv "${ORIG_DIR}" "${NEW_DIR}" &>> /dev/null
 else      if [[ $? != 0 ]]
     echo "[OK]"      then
 fi          echo "[FAIL]"
           exit 1
       else
           echo "[OK]"
       fi
   
   
       echo -n "${PGM}:  generating ${NEW_TARBALL}..."
       tar cf "${NEW_TARBALL}" "${NEW_DIR}" &>> /dev/null
       if [[ $? != 0 ]]
       then
           echo "[FAIL]"
           exit 1
       else
           echo "[OK]"
       fi
   fi
   
 echo -n "${PGM}:  uploading source tarball..."  echo -n "${PGM}:  uploading source tarball..."
 scp "${NEW_TARBALL}" jpw@freem.coherent-logic.com://var/www/freem.coherent-logic.com/downloads/ &>> "${LOGFILE}"  scp "${NEW_TARBALL}" jpw@freem.coherent-logic.com://var/www/freem.coherent-logic.com/downloads/ &>> "${LOGFILE}"

Removed from v.1.3  
changed lines
  Added in v.1.4


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