奶头挺立呻吟高潮av全片,成人试看120秒体验区,性欧美极品v,A片高潮抽搐揉捏奶头视频

操作系統(tǒng)

Linux系統(tǒng)通過命令行建立dmg文件

時間:2025-02-18 00:14:34 操作系統(tǒng) 我要投稿
  • 相關(guān)推薦

Linux系統(tǒng)通過命令行建立dmg文件

  Linux系統(tǒng)操作中,很多人對dmg文件不甚了解,更不知道要如何創(chuàng)建dmg文件了,本文要給大家介紹的是Linux使用命令行建立dmg文件的方法,不了解的朋友可以來了解下。更多內(nèi)容請關(guān)注應(yīng)屆畢業(yè)生網(wǎng)!

  什么是DMG文件,如何打開?

  DMG格式是在MAC系統(tǒng)上的一個鏡象文件,也可以說是壓縮文件,如果你用PC且沒有裝MAC OS X for X86的話,就不要費力了。如果你是使用蘋果機或在PC上裝了MAC OS X for X86,在MAC系統(tǒng)上雙擊這個文件就可以解開了;如果想把這個文件燒錄成DVD,用toast把文件燒成光盤即可:dmg=》disc image

  命令行創(chuàng)建dmg

  自動獲取軟件版本號

  APP_NAME=“Soulver”

  VERSION=$(/usr/libexec/plistbuddy -c Print:CFBundleShortVersionString: “${APP_NAME}.app/Contents/Info.plist”)

  DMG_BACKGROUND_IMG=“Background.png”

  VOL_NAME=“${APP_NAME} ${VERSION}”

  DMG_TMP=“${VOL_NAME}-temp.dmg”

  DMG_FINAL=“${VOL_NAME}.dmg”

  STAGING_DIR=“。/Install”

  創(chuàng)建dmg

  # 清理文件夾

  rm -rf “${STAGING_DIR}” “${DMG_TMP}” “${DMG_FINAL}”

  # 創(chuàng)建文件夾,拷貝,計算

  mkdir -p “${STAGING_DIR}”

  cp -rpf “${APP_NAME}.app” “${STAGING_DIR}”

  SIZE=`du -sh “${STAGING_DIR}” | sed ‘s/([0-9.]*)M(.*)/1/’`

  SIZE=`echo “${SIZE} + 1.0” | bc | awk ‘{print int($1+0.5)}’`

  # 容錯處理

  if [ $? -ne 0 ]; then

  echo “Error: Cannot compute size of staging dir”

  exit

  fi

  # 創(chuàng)建臨時dmg文件

  hdiutil create -srcfolder “${STAGING_DIR}” -volname “${VOL_NAME}” -fs HFS+

  -fsargs “-c c=64,a=16,e=16” -format UDRW -size ${SIZE}M “${DMG_TMP}”

  echo “Created DMG: ${DMG_TMP}”

  設(shè)置dmg

  DEVICE=$(hdiutil attach -readwrite -noverify “${DMG_TMP}” |

  egrep ‘^/dev/’ | sed 1q | awk ‘{print $1}’)

  sleep 2

  # 增加Applications目錄的軟鏈接

  echo “Add link to /Applications”

  pushd /Volumes/“${VOL_NAME}”

  ln -s /Applications

  popd

  # 拷貝背景圖片

  mkdir /Volumes/“${VOL_NAME}”/.background

  cp “${DMG_BACKGROUND_IMG}” /Volumes/“${VOL_NAME}”/.background/

  # 使用applescript設(shè)置一系列的窗口屬性

  echo ‘

  tell application “Finder”

  tell disk “’${VOL_NAME}‘”

  open

  set current view of container window to icon view

  set toolbar visible of container window to false

  set statusbar visible of container window to false

  set the bounds of container window to {400, 100, 938, 432}

  set viewOptions to the icon view options of container window

  set arrangement of viewOptions to not arranged

  set icon size of viewOptions to 72

  set background picture of viewOptions to file “.background:’${DMG_BACKGROUND_IMG}‘”

  set position of item “’${APP_NAME}‘.app” of container window to {160, 195}

  set position of item “Applications” of container window to {360, 195}

  close

  open

  update without registering applications

  delay 2

  end tell

  end tell

  ’ | osascript

  sync

  # 卸載

  hdiutil detach “${DEVICE}”

  壓縮dmg

  echo “Creating compressed image”

  hdiutil convert “${DMG_TMP}” -format UDZO -imagekey zlib-level=9 -o “${DMG_FINAL}”

  # 清理文件夾

  rm -rf “${DMG_TMP}”

  rm -rf “${STAGING_DIR}”

  echo ‘Done.’

  exit

  上面就是Linux使用命令行創(chuàng)建dmg文件的方法介紹了,上文對什么是dmg文件做了詳細介紹,讓用戶對dmg文件有更深入的認識。

【Linux系統(tǒng)通過命令行建立dmg文件】相關(guān)文章:

Linux系統(tǒng)文件管理09-16

linux的文件系統(tǒng)05-05

Linux系統(tǒng)的文件設(shè)置方法05-24

Linux文件系統(tǒng)的幾個要點08-18

Linux系統(tǒng)文件系統(tǒng)優(yōu)化及磁盤檢查的方法07-05

Linux系統(tǒng)文件目錄管理常用的命令10-20

解讀 Linux 集群的新型文件系統(tǒng)07-10

Linux文件系統(tǒng)結(jié)構(gòu)分析論文09-09

Linux 文件系統(tǒng)管理07-26

主站蜘蛛池模板: 夏河县| 金塔县| 日喀则市| 仙桃市| 屏边| 西丰县| 崇州市| 梁河县| 湟源县| 陆川县| 南木林县| 乐山市| 巴林左旗| 阿城市| 修文县| 贞丰县| 平武县| 榆中县| 苍溪县| 成武县| 吴江市| 吉林省| 手机| 扎囊县| 衡阳县| 宜章县| 时尚| 左贡县| 长垣县| 巴林右旗| 砚山县| 罗定市| 建德市| 定襄县| 阳朔县| 曲周县| 甘孜县| 尚志市| 韶关市| 呼图壁县| 肇庆市|