Поэтому я создал bash-скрипт, который отлично работает на MAC, но на Windows даже с установленным Cygwin и CURL не работает, вот ошибки, которые я получаю
$ ./r.bash
Project name:
imiodrag
': not a valid identifiertheme_name
: No such file or directory
mkdir: cannot create directory `\r': File exists
>>>>>>>>>>Downloading wordpress...
Warning: Failed to create the file latest.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
158 158 0 158 0 0 531 0 --:--:-- --:--:-- --:--:-- 531
curl: (23) Failed writing body (0 != 8)
tar (child): latest.tar.gz\r: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
rm: cannot remove `latest.tar.gz\r': No such file or directory
>>>>>>>>>>Moving files...
mv: cannot stat `start-project/wp-base/': No such file or directory
: No such file or directorycontent/themes/
: No such file or directoryib/
>>>>>>>>>>Now downloading jquery...
Warning: Failed to create the file jquery-latest.min.js
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
1 93436 1 1127 0 0 17888 0 0:00:05 --:--:-- 0:00:05 17888
curl: (23) Failed writing body (0 != 1127)
: No such file or directory./
' is not a git command. See 'git --help'.
Did you mean this?
init
' did not match any files
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'Lili@Lili-PC.(none)')
: No such file or directory./../../
А вот и скрипт:
#!/bin/bash
echo ""
echo "Project name: "
read theme_name
cd "../"
mkdir "$theme_name"
cd "$theme_name"
echo ">>>>>>>>>>Downloading wordpress..."
echo ""
curl -O http://wordpress.org/latest.tar.gz
tar --strip-components=1 -zxf latest.tar.gz
rm latest.tar.gz
cd "../"
echo ">>>>>>>>>>Moving files..."
echo ""
mv start-project/wp-base/ "$theme_name/wp-content/themes/$theme_name"
cd "$theme_name/wp-content/themes/$theme_name"
cd js/lib/
echo ">>>>>>>>>>Now downloading jquery..."
echo ""
curl -O http://code.jquery.com/jquery-latest.min.js
cd ../../
git init
git add .
git commit -a -m "First commit"
cd ../../../../
rm -rf start-project
Так почему же не работает на Windows?какие-либо советы? Я на Windows 7 64bit Ultimate