Quantumult X 任务脚本功能讲解 working copy远程挂载

这个方法可以让你的脚本库自动更新,不用再去手动修改你的脚本文件了

首选我们需要下载一个软件 working copy(你可以把它当做手机端的github客户端)

然后我们进入github复制下面这个链接

然后到任意目录下新建一个文件夹

然后我们点击这里,新增一个远程共享

选择刚才创建的文件夹,然后点击 done

点击 add remote

在这里输入刚才我们复制的链接,记得把 allow push 关掉,然后点击右上脚的报错

然后点击右下的图标,打开到这里,(这里第一次一般都会失败不要慌,退出应用,重新打开在主界面刷新几次就可以了

然后我们需要选择一个你需要的脚本库

进去,是这样的说明我们的脚本库已经挂载成功了,你可以去文件夹里面看是否有文件

我们进入到 圈X里面修改配置,添加上文件夹路径

然后保存,出去调试

就可以了,如果有帮助到你,点个赞吧谢谢~

您可以使用以下shell脚本来生成dmg包: ```shell #!/bin/bash APP_NAME="YourAppName" APP_SRC="path/to/your/app" APP_ICON="path/to/your/icon.icns" DMG_BACKGROUND="path/to/background.jpg" DMG_NAME="$APP_NAME.dmg" VOL_NAME="$APP_NAME" # Create a temporary working directory WORK_DIR=`mktemp -d /tmp/${APP_NAME}-dmg.XXXXXX` || exit 1 # Copy the application to the working directory cp -R "$APP_SRC" "$WORK_DIR/$APP_NAME.app" # Set the icon of the application sips -i "$APP_ICON" --out "$WORK_DIR/$APP_NAME.app/Contents/Resources/app.icns" # Create a symlink to the Applications folder ln -s /Applications "$WORK_DIR" # Create the DMG hdiutil create -srcfolder "$WORK_DIR" -volname "$VOL_NAME" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size 100m "$DMG_NAME" # Mount the DMG MOUNT_DIR=`mktemp -d /tmp/${APP_NAME}-mount.XXXXXX` || exit 1 hdiutil attach -nobrowse -mountpoint "$MOUNT_DIR" "$DMG_NAME" # Add the background image cp "$DMG_BACKGROUND" "$MOUNT_DIR/.background.jpg" ln -s /Applications "$MOUNT_DIR/Applications" # Set the icon size of the DMG window WINDOW_SIZE="400 400" 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 {0, 0, $WINDOW_SIZE} set theViewOptions to the icon view options of container window set arrangement of theViewOptions to not arranged set icon size of theViewOptions to 72 set background picture of theViewOptions to file \".background.jpg\" close open update without registering applications delay 2 set statusbar visible of container window to false set toolbar visible of container window to false set the bounds of container window to {0, 0, $WINDOW_SIZE} end tell end tell " | osascript # Unmount the DMG hdiutil detach "$MOUNT_DIR" rm -rf "$MOUNT_DIR" # Convert the DMG to a compressed read-only format hdiutil convert "$DMG_NAME" -format UDZO -imagekey zlib-level=9 -o "$APP_NAME-Compressed.dmg" # Clean up the working directory rm -rf "$WORK_DIR" # Open the DMG open "$APP_NAME-Compressed.dmg" ``` 在脚本中,您需要将以下变量替换为您的实际值: - APP_NAME:您的应用程序名称 - APP_SRC:您的应用程序源代码的路径 - APP_ICON:您的应用程序图标的路径 - DMG_BACKGROUND:DMG包的背景图像的路径 - DMG_NAME:生成的DMG文件的名称 - VOL_NAME:DMG的卷名称 运行脚本后,它将创建一个临时工作目录,并将应用程序复制到该目录中。然后,它将设置应用程序的图标,创建一个指向应用程序的符号链接,并创建一个DMG文件。接下来,它将挂载DMG文件,并将背景图像添加到DMG文件中。最后,它将设置DMG窗口中的图标大小和背景图像,并将DMG转换为压缩的只读格式。最终,它将删除工作目录并打开DMG文件。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

dayaoK

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值