리눅스

nexus 3 기준 일괄 업로드 sh 스크립트

초이짬 2021. 5. 4. 11:07
728x90
#!/bin/bash
files="./files.out"
username="계정"
password="비번"
nexusurl="http://접속주소/repository/yum-hosted/"
find . -name '*.rpm' -type f | cut -c 3- | grep "." > $files
while read i; do
echo "upload $i to $nexusurl"
curl -v -u $username:$password --upload-file $i "$nexusurl$i"
done <$files
728x90