File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ curl $DMG_DOWNLOAD_URL \
2525
2626sudo hdiutil attach $DMG_OUTPUT_PATH
2727sudo /Volumes/Docker/Docker.app/Contents/MacOS/install --accept-license --user=" $( whoami) "
28- sudo hdiutil unmount " /Volumes/Docker"
28+ sudo hdiutil detach " /Volumes/Docker"
2929
3030rm -rf $DMG_OUTPUT_PATH
3131
Original file line number Diff line number Diff line change @@ -8,17 +8,17 @@ if command -v code &> /dev/null; then
88 exit 0
99fi
1010
11- VSCODE_DOWNLOAD_URL=" https://code.visualstudio.com/sha/download?build=stable&os=darwin-universal"
12- FILE_TEMP_OUTPUT_PATH =" ./vscode.zip "
11+ VSCODE_DOWNLOAD_URL=" https://code.visualstudio.com/sha/download?build=stable&os=darwin-universal-dmg "
12+ DMG_OUTPUT_PATH =" ./vscode.dmg "
1313
1414curl " $VSCODE_DOWNLOAD_URL " \
15- --output $FILE_TEMP_OUTPUT_PATH \
15+ --output $DMG_OUTPUT_PATH \
1616 --fail \
1717 --compressed \
1818 --location
1919
20- unzip -ao $FILE_TEMP_OUTPUT_PATH
20+ sudo hdiutil attach $DMG_OUTPUT_PATH
21+ cp -r -v " /Volumes/VS Code/Visual Studio Code.app/" " /Applications/Visual Studio Code.app"
22+ sudo hdiutil detach " /Volumes/VS Code"
2123
22- mv -f -v " ./Visual Studio Code.app" " /Applications/Visual Studio Code.app"
23-
24- rm -rf $FILE_TEMP_OUTPUT_PATH
24+ rm -rf $DMG_OUTPUT_PATH
You can’t perform that action at this time.
0 commit comments