Fixed timezone script for macOS and a typo
This commit is contained in:
		@@ -10,7 +10,7 @@
 | 
			
		||||
#   01-ewfinfo
 | 
			
		||||
#
 | 
			
		||||
# USAGE:
 | 
			
		||||
#   Right klick on the first file of an EWF image and
 | 
			
		||||
#   Right click on the first file of an EWF image and
 | 
			
		||||
#   choose this nautilus script from the context menu.
 | 
			
		||||
#
 | 
			
		||||
# OPTIONS:
 | 
			
		||||
 
 | 
			
		||||
@@ -2,15 +2,15 @@
 | 
			
		||||
#===============================================================================
 | 
			
		||||
#
 | 
			
		||||
# DIRECTORY:
 | 
			
		||||
#   /home/*/.local/share/nautilus/scripts/05b_macOS/
 | 
			
		||||
#   /home/*/.local/share/nautilus/scripts/05b-macOS/
 | 
			
		||||
# OR
 | 
			
		||||
#   /home/*/.gnome2/nautilus-sctipts/05b_macOS/ (deprecated)
 | 
			
		||||
#   /home/*/.gnome2/nautilus-sctipts/05b-macOS/ (deprecated)
 | 
			
		||||
#
 | 
			
		||||
# FILE:
 | 
			
		||||
#   02_timezone
 | 
			
		||||
#   02-E01-timezone
 | 
			
		||||
#
 | 
			
		||||
# USAGE:
 | 
			
		||||
#   Right klick on an EWF (or RAW) image and
 | 
			
		||||
#   Right click on the first file of an EWF image and
 | 
			
		||||
#   choose this nautilus script from the context menu.
 | 
			
		||||
#
 | 
			
		||||
# OPTIONS:
 | 
			
		||||
@@ -102,8 +102,6 @@ check_dep "${MMLS_BIN}" "sleuthkit"
 | 
			
		||||
check_dep "${PLUTIL_BIN}" "libplist-utils"
 | 
			
		||||
check_dep "${RM_BIN}" "coreutils"
 | 
			
		||||
check_dep "${SED_BIN}" "sed"
 | 
			
		||||
 | 
			
		||||
# https://raw.githubusercontent.com/casualscripter/debian-stuff
 | 
			
		||||
check_dep "${PPEPY_BIN}" "print_plist_entry.py"
 | 
			
		||||
 | 
			
		||||
check_ext "${SOURCE}" "[eE]01"
 | 
			
		||||
@@ -144,18 +142,14 @@ if ${FSSTAT_BIN} -o "${OFFSET}" "${SOURCE}" > /dev/null 2>&1 ; then
 | 
			
		||||
                          -n "/Library/Preferences/.GlobalPreferences.plist" \
 | 
			
		||||
                          "${SOURCE}" )"
 | 
			
		||||
    if [ "${pref}" != "File not found" ] ; then
 | 
			
		||||
      if [ ! -f "${TMP}/GlobalPreferences.plist" ] ; then
 | 
			
		||||
        if ! ${ICAT_BIN} -o "${OFFSET}" "${SOURCE}" "${pref}" > "/tmp/${pref}.plist" ; then
 | 
			
		||||
      if [ ! -f "${TMP}/${OFFSET}-GlobalPreferences.plist" ] ; then
 | 
			
		||||
        if ! ${ICAT_BIN} -o "${OFFSET}" "${SOURCE}" "${pref}" > "${TMP}/${OFFSET}-GlobalPreferences.plist" ; then
 | 
			
		||||
          echo "  During the execution of icat an error occurred." >> "${TIMEZONE}"
 | 
			
		||||
        fi
 | 
			
		||||
        ${PLUTIL_BIN} --format xml --infile "/tmp/${pref}.plist" --outfile "${TMP}/GlobalPreferences.plist"
 | 
			
		||||
        ${RM_BIN} "/tmp/${pref}.plist"
 | 
			
		||||
        # since 10.10 (Yosemite) it seems, that the converted XML is not well formed!?
 | 
			
		||||
        #${SED_BIN} --in-place --regexp-extended '/<key>AppleLanguages<\/key>/,/<\/array>/ s/string/key/g' "${TMP}/GlobalPreferences.plist"
 | 
			
		||||
      fi
 | 
			
		||||
      echo -e -n "  Some content from \".GlobalPreferences.plist\":\n  " \
 | 
			
		||||
      >> "${TIMEZONE}"
 | 
			
		||||
      ${PPEPY_BIN} "${TMP}/GlobalPreferences.plist" TimeZoneName \
 | 
			
		||||
      ${PPEPY_BIN} "${TMP}/${OFFSET}-GlobalPreferences.plist" TimeZoneName \
 | 
			
		||||
      >> "${TIMEZONE}"
 | 
			
		||||
      echo >> "${TIMEZONE}"
 | 
			
		||||
    else
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user