Answer the question
In order to leave comments, you need to log in
How to make automatic input of a set of commands in a script?
#!/bin/bash -e
cd "$(dirname "$0")"
test -e compiled || mkdir compiled
if ; then
for sourcefile in "[email protected]"
do
smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`"
echo -e "\nCompiling $sourcefile..."
./spcomp $sourcefile -ocompiled/$smxfile
lftp user:[email protected]
cd /addons/sourcemod/plugins && mput /home/sm/compiled/$smxfile
done
else
for sourcefile in *.sp
do
smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`"
echo -e "\nCompiling $sourcefile ..."
./spcomp $sourcefile -ocompiled/$smxfile
lftp user:pass:[email protected] | cd /addons/sourcemod/plugins && mput /home/sm/compiled/$smxfile
done
fi
Answer the question
In order to leave comments, you need to log in
pipe to the other side
what for ftp when there is ssh ?
scp /мой/файл [email protected]:/куда/заливать/ -i ~/.ssh/мой_ключ
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question