I have two folders, A and B. In folder A, I have a data file. In folder B, I have program files. I want the programs in folder B to operate on the file in folder A, running from folder B.
The only way I could come up with was a script that moves the file from A to B, runs the commands from folder B on the file, then moves the output file from B back to A. Is there anyway that I could keep the file in folder A and run the programs from B?
Here is my script right now. It is very messy, and I think there should be a cleaner way of doing it.
echo "Signing with test keys....";
mv *.apk $HOME/signapk/files/not_signed.apk;
cd $HOME/signapk/files;
java -jar signapk.jar testkey.x509.pem testkey.pk8 not_signed.apk signed_apk.apk;
mv not_signed.apk $HOME/signapk/original.apk;
mv signed_apk.apk $HOME/signapk/test_signed.apk;;
2) echo "Signing with private keys....";
mv *.apk $HOME/signapk/files/not_signed.apk;
cd $HOME/signapk/files;
java -jar signapk.jar certificate.pem key.pk8 not_signed.apk signed_apk.apk;
mv not_signed.apk $HOME/signapk/original.apk;
mv signed_apk.apk /$HOME/signapk/private_signed.apk;;
3) echo "Press enter to contintue with zipaligning";
read ;
mv *.apk $HOME/signapk/files/zipalign.apk;
cd $HOME/signapk/files;
./zipalign -v -f 4 zipalign.apk zipaligned.apk;
mv zipaligned.apk $HOME/signapk/zipaligned;
mv zipalign.apk $HOME/signapk/original.apk;;
I got it! All you you have to do is append the path to the file.
Thus:
becomes: