so i have a simple batch tool
its url is somesite.tool[version].zip
eg: somesite.tool1.9.zip
and theres a file in the tool called version.
in this case it contains 1.9
the tool.zip will have the file version in its main folder
also it has 7za.exe in main folder.
and theres another file 'somesite.version.txt'
Oh just a note, the file downloads instantly on just entering the url and pressing enter (dropbox)
start "somesite.version.txt"
set /p "newversion=<path\version.txt"
its the path which gives the prob i know nothing about the path.
What i wanna to do is add a feature update in the tool which will automatically do the following
> download the version.txt
> close the browser from which it was dowloaded (optional)
> check with the current version.txt
> if not same extract the new tool after deleting the previous one
i am stuck at comparing coz i dont know where the file is downloaded automatically.
thanks in advance for your efforts
Found the Answer
using wget.exe i can download the file to the current directory
wget somesite.version.txt
Related
I'm having trouble with the 'Run Script' in the Xcode IDE. I'm able to download a file from a server using this script below, straight into a directory in Xcode, which can be viewed, by way of right clicking on the folder in the IDE where the download has been sent to, however although it appears here, its not appearing in the 'Copy Bundle Resources' nor in the Xcode resources folder, so when trying to pull this file into the code, I get file doesn't exist.
I'm aware of how to add the file manually(+), however this would be better if it run's automatically in the script.
Can anyone help with this Bash Script below, I've tried to copy (cp) to ${PRODUCTS_DIR} and ${BUILT_PRODUCTS_DIR} but its not copying over for some reason. I'm able to (mv) move the file but still this does appear in the 'Copy Bundle Resources'? Anyone got any clues to this? Thanks in advance.
fileToDownload=$(ssh $Username#server1 ls -t /doc_test_control/the_test_foler/myFile.txt)
echo "File to download: $fileToDownload"
scp $Username#server1:$fileToDownload "${SRCROOT}/Mobile-App-iOS/Test_Foler/"
echo "File downloaded to : ${SRCROOT}/"
mv "${SRCROOT}/Mobile-App-iOS/Test_Foler/""* "${BUILT_PRODUCTS_DIR}"
ls -l "${SRCROOT}/Mobile-App-iOS/Test_Foler/"
echo "DONE"
It looks like you need to copy the downloaded file inside the Bundle using bash commands in the Run Script phase itself. Please use the following script to copy the resource to the bundle.
cp downloadedFile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/
UNLOCALIZED_RESOURCES_FOLDER_PATH is nothing but app path itself. Please see its value in Build logs.
export UNLOCALIZED_RESOURCES_FOLDER_PATH=TestProject.app
I tested this with my local file in Desktop folder and found it to be working.
You cannot use "Copy Bundle Resource" phase to copy the downloaded file at compile time. Because, to use "Copy Bundle Resource", it has to be added to the Target which is not possible when it is downloaded during compile time.
I have downloaded the XPGK .zip archive to be able to upload my component to the Xamarin Store. I have done so by following the first step of this guide.
But when I click the .exe file a command prompt file just appears and disappears? What's the issue?
Did you follow the guide? It doesn't mention that you should click the .exe file to open it. Instead, the .exe file is used to generate the directory structure required for your component.
Use the xamarin-component.exe to create the base structure by typing the following into the console/terminal where is the base folder for your component.
Note: you will need to change the path to the location where you extracted the ".exe” file.
This means that you should first extract the .exe file to a directory where you want your solution to be placed (most likely your workspace).
Then, using a console/terminal, navigate to the directory in which you extracted the .exe file and type the following:
For Windows:
xamarin-component.exe create <foldername>
for OS X:
mono xamarin-component.exe create <foldername>
Where <foldername> is the name you want your directory to be.
I have created jekyll site. Regarding the deployment I don't want to host on github pages. To host private domain I came know from documentation to copy the all files from _site folder. That's all wicked.
Question:
Each time I add new blog post, I am running cmd>jekyll build then I am copying newly created html to hosted domain. Is there any easy way to update without compiling each time ?
The reason, Why I am asking is because it will updated by non technical person
Thanks for the help!!
If you don't want to use GitHub Pages, AFAIK there's no other way than to compile your site each time you make a change.
But of course you can script/automate as much as possible.
That's what I do with my own blog as well. I'm hosting it on my own webspace instead of GitHub Pages, so I need to do these steps for each update:
Compile on local machine
Upload via FTP
I can do this with a single click (okay, a single double-click).
Note: I'm on Windows, so the following solution is for Windows.
But if you're using Linux/MacOS/whatever, of course you can use the tools given there to build something similar.
I'm using a batch file (the Windows equivalent to a shell script) to compile my site and then call WinSCP, a free command-line FTP client.
WinSCP allows me to store session configurations, so I saved the connection to my server there once.
Because of this, I didn't want to commit WinSCP to my (public) repository, so my script expects WinSCP in the parent folder.
The batch file looks like this:
call jekyll build
echo If the build succeeded, press RETURN to upload!
pause
set uploadpath=%~dp0\_site
%~dp0\..\winscp.com /script=build-upload.txt /xmllog=build-upload.log
pause
The first parameter in the WinSCP call (/script=build-upload.txt) specifies the script file which contains the actual WinSCP commands
This is in the script file:
option batch abort
option confirm off
open blog
synchronize remote -delete "%uploadpath%"
close
exit
Some explanations:
%~dp0 (in the batch file) is the folder where the current batch file is
The set uploadpath=... line (in the batch file) saves the complete path to the generated site into an environment variable
The open blog line (in the script file) opens a connection to the pre-saved session configuration (which I named blog)
The synchronize remote ... line (in the script file) uses the synchronize command to sync from the local folder (saved in %uploadpath%, the environment variable from step 2) to the server.
IMO this solution is suitable for non-technical persons as well.
If the technical person in your case doesn't know how to use source control, you could even script committing & pushing, too.
There are a number of options available which are mentioned in the documentation: http://jekyllrb.com/docs/deployment-methods/
If you are using Git, I would recommend the Git Post-Receive Hook approach. It simply builds the site after the new code is received:
GIT_REPO=$HOME/myrepo.git
TMP_GIT_CLONE=$HOME/tmp/myrepo
PUBLIC_WWW=/var/www/myrepo
git clone $GIT_REPO $TMP_GIT_CLONE
jekyll build -s $TMP_GIT_CLONE -d $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
exit
Since you mentioned that it will be updated by a non-technical person, you might try something like rack-jekyll to automatically rebuild when new files are FTP'd.
I am working with svn server to upload my updated file to server. But at last when i upload latest copy to server at that time i get Obstructing warning in my below given Xcode project file. I dont know what to do for this please help me to get it out.
Following is my file which is giving me Obstructing warning.
UserInterfaceState.xuserstate.
dat0b55.00f
When i search this file in finder it give me location of xproject workspace.path as below:
MyProject.xcodeproj/project.xcworkspace/xcuserdata/myworkspace.xcuserdatad/UserInterfaceState.xcuserdatad.
I can't understand how to remove this warning. I can't remove project and upload fresh copy because it is on client server.
So, If it possible please help me to solve it manually without deleting project.
I have solved this by replacing all required files from my back up.You can get above file from .pbx extract your project file with show in package content and replace it.It's work for me fine.
I am having strange problem. I used to run appcfg.py to update my app to appengine but now its not working anymore. When I run this command
C:\Program Files <x86>\Google\google_appengine>appcfg.py update E:\path\myApp\
Its not giving me anything, no error no feedback. Its just back to this line
C:\Program Files <x86>\Google\google_appengine>
Any idea about this issue!
P.S. I'm using Python 2.7. My code is updating through google app launcher but I need to run it from cmd prompt as I will be downloading/uploading appengine stuff which launcher doesn't allow me to do!
Thanks
I still had a little trouble with the instructions. Here's the steps I used to create a batch file to use the Google App Engine download_app with Windows 7.
In my example,
I'll use drive, C:
Default python path will be, C:\Python27\python.exe
GAE path (include "), "C:\Program Files (x86)\Google\google_appengine\appcfg.py"
App ID {your_app_id} will be just your app-id name
{your_app_version} is the "Version:" number in your GAE app.yaml file
I'll create a folder on my Windows 7 desktop and call it GAE_App
The desktop folder path will be C:\Users\{username}\Desktop\GAE_App
{your email} will be the Gmail account connected to your GAE
Right-click on the desktop and select New->Text Document. Open the newly created text document and add the following line of code modified for your setup to the blank text document,
C:\Python27\python.exe "C:\Program Files (x86)\Google\google_appengine\appcfg.py" download_app -A {your_app_id} -V {your_app_version} --email={your email} C:\Users\{username}\Desktop\GAE_App
Save the text document and change the file name to GAE_Download.bat
It's important that the extension now says ".bat" instead of ".txt"
Once finished, click on the batch to execute it. You'll be asked for a password and then the files should download into the GAE_App folder on your desktop. Now, whenever you need to download your files, just click on the batch file.
Not sure why Google didn't simply include this feature with their GAE for Windows software.
I faced the same issue. Here is a simple solution.
Just do this following Steps:
Go to program file where google app engine is installed. Generally It is named as Google.
click on appcfg.py and select open with.. Select "Choose Default Programs".
Select Python from programs and select "Always Use the selected program to open this kind of file" .
Now run the command you should get the results on command line.
For reference click here
Fixed by accessing python lib like that
C:\Python27>python appcfg.py update E:\path\myApp\
Here's a solution that worked for me:
"google_appengine/appcfg.py" update "C:\PATH TO APP
The appcfg.bat that should be used is located **C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\appengine-java-sdk\bin** and not the empty appcfg.bat that for some unknown reason also was here C:\Program Files\Google\Cloud SDK\
Good practice is to add this path to the system variable PATH
This worked for me
Basis
<PATH_TO_PYTHON>python <PATH_TO_APPCFG.PY>appcfg.py -A <PROJECT_INSTANCE_NAME> update app.yaml
Example
X:\Software\Python2.7\python Q:\SOFTWARE\GoogleAppEngineSDK\appcfg.py -A great-1337 update app.yaml