forked from Maschell/hid_to_vpad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ftpupload.sh
52 lines (38 loc) · 1.78 KB
/
ftpupload.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#! /bin/bash
#
cd $TRAVIS_BUILD_DIR/wiiu/apps/hidtovpad
for entry in "$TRAVIS_BUILD_DIR/wiiu/apps/hidtovpad"/*; do
if [ "${entry##*/}" != "languages" ]; then
echo "Uploading ${entry##*/}"
curl --ftp-create-dirs -T "${entry##*/}" -u $FTP_USER:$FTP_PASSWORD "$FTP_SERVER/${entry##*/}" > /dev/null 2>&1
fi
done
IFS=$'\n' # make newlines the only separator
# controller configs
for f in `curl -u $FTP_USER:$FTP_PASSWORD $FTP_SERVER/sd/wiiu/controller/ --silent --use-ascii --list-only`; do
if [ "$f" != "." ] && [ "$f" != ".." ]; then
echo "Deleting sd/wiiu/controller/${f##*/}"
curl -v -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_SERVER/ -Q "DELE sd/wiiu/controller/$f" --silent > /dev/null 2>&1
fi
done
cd $TRAVIS_BUILD_DIR/wiiu/controller
for entry in "$TRAVIS_BUILD_DIR/wiiu/controller"/*
do
echo "Uploading ${entry##*/}"
curl --ftp-create-dirs -T "${entry##*/}" -u $FTP_USER:$FTP_PASSWORD "$FTP_SERVER/sd/wiiu/controller/${entry##*/}" > /dev/null 2>&1
done
# Language files
for f in `curl -u $FTP_USER:$FTP_PASSWORD $FTP_SERVER/sd/wiiu/apps/hidtovpad/languages/ --silent --use-ascii --list-only`; do
if [ "$f" != "." ] && [ "$f" != ".." ]; then
echo "Deleting sd/wiiu/apps/hidtovpad/languages/${f##*/}"
curl -v -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_SERVER/ -Q "DELE sd/wiiu/apps/hidtovpad/languages/$f" --silent > /dev/null 2>&1
fi
done
cd $TRAVIS_BUILD_DIR/languages
for entry in "$TRAVIS_BUILD_DIR/languages"/*
do
echo "Uploading ${entry##*/}"
curl --ftp-create-dirs -T "${entry##*/}" -u $FTP_USER:$FTP_PASSWORD "$FTP_SERVER/sd/wiiu/apps/hidtovpad/languages/${entry##*/}" > /dev/null 2>&1
done
curl -v -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_SERVER/ -Q "DELE .deletetoupdate" --silent > /dev/null 2>&1
curl $REFRESH