2017-08-29 17:17:25 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
changes_file=$1
|
|
|
|
|
2017-08-30 05:51:28 +02:00
|
|
|
source /home/vinaigrette/config/config
|
2017-08-31 00:35:22 +02:00
|
|
|
source /home/vinaigrette/scripts/package_helpers.sh
|
2017-08-29 17:17:25 +02:00
|
|
|
|
|
|
|
INCOMING_DIR=${REPO_DIR}/incoming
|
|
|
|
|
|
|
|
# Retrieve changes file directory
|
|
|
|
dir=$(cd `dirname $changes_file` && pwd)
|
|
|
|
|
|
|
|
# Move file to incoming directory
|
|
|
|
for f in $(get_files ${changes_file}); do
|
|
|
|
if [[ $f =~ \.orig\.tar\.(gz|xz)$ ]]; then
|
|
|
|
echo "* Copying ${f}..."
|
|
|
|
sudo cp ${dir}/${f} $INCOMING_DIR
|
|
|
|
else
|
|
|
|
echo "* Moving ${f}..."
|
|
|
|
sudo mv ${dir}/${f} $INCOMING_DIR
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Move changes file too
|
|
|
|
echo "* Moving $(basename ${changes_file})..."
|
|
|
|
sudo mv ${changes_file} $INCOMING_DIR
|