7 echo "Usage: $0 filename version arch changes_file suite"
11 export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
14 WIN32_LOADER_PATH="$1" # win32-loader_${VERSION}_${ARCH}{.exe,txt}
15 WIN32_LOADER_FILE="${WIN32_LOADER_PATH##*/}"
18 CHANGES="$4" # Changes file for the upload
22 unstable|sid|*-proposed-updates)
26 SUITE="${SUITE}-proposed-updates"
30 case "${WIN32_LOADER_FILE}" in
31 win32-loader_*.exe|win32-loader_*.txt)
35 echo "Error: invalid filename for byhand-win32-loader"
40 # This must end with /
41 TARGET="${ftpdir}/tools/win32-loader/${SUITE}/"
43 # Prepare the target filename by removing the version and arch parts;
44 # transforms any/path/win32-loader_${VERSION}_${ARCH}.${extension} to win32-loader.${extension}
45 TARGET_FILENAME="${WIN32_LOADER_FILE%%_*}.${WIN32_LOADER_FILE##*.}"
47 # Check validity of the target directory
48 if [ ! -d "$TARGET" ]; then
52 # Put said file into the tools directory
53 # Use --remove-destination to avoid problems with the fact that the target may
54 # be a hardlink and in that case we'd update multiple suites together
55 cp --remove-destination "$WIN32_LOADER_PATH" "${TARGET}${TARGET_FILENAME}"
58 chmod 0644 "${TARGET}${TARGET_FILENAME}"