Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Shell script fail #1121

Closed
avently opened this issue Oct 8, 2016 · 2 comments
Closed

Shell script fail #1121

avently opened this issue Oct 8, 2016 · 2 comments

Comments

@avently
Copy link

avently commented Oct 8, 2016

Hello. I wrote a simple script that can help me to work with ADB (Android Debug Bridge). Commands executed in terminal window works fine, but when i wrote it in .sh file it failed. Here is a code. adb.exe is in the $PATH.

λ cd "C://Users/stani/Desktop/Android Image Kitchen"  && adb.exe push image-new.img /sdcard/boot.img && adb.exe shell su -c dd if=/sdcard/boot.img of=/dev/block/mmcblk0p7 bs=4096
4997 KB/s (8419328 bytes in 1.645s)
2055+1 records in
2055+1 records out
8419328 bytes transferred in 1.023 secs (8230037 bytes/sec)

BUT in .sh file:

λ sh test.sh
failed to copy 'image-new.img' to 'D:/Apps/cmder/vendor/git-for-windows/sdcard/boot.img': secure_mkdirs failed: No such file or directory

Why is it happening? How it can be fixed?

@mrRosset
Copy link

mrRosset commented Oct 8, 2016

rename test.sh => test.bat, launch it by writing "test.bat" or simply "test" in cmder

@avently
Copy link
Author

avently commented Oct 8, 2016

Ok, it's working! Thank you, @mrRosset

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants