[fix] Make repo directory during soup if it doesn't exist

This commit is contained in:
William Wernert
2020-12-16 16:18:17 -05:00
parent 6e84227525
commit 384456a991

View File

@@ -158,6 +158,7 @@ copy_new_files() {
generate_and_clean_tarballs() {
local new_version
new_version=$(cat $UPDATE_DIR/VERSION)
[ -d /opt/so/repo ] || mkdir -p /opt/so/repo
tar -cxf "/opt/so/repo/$new_version.tar.gz" "$UPDATE_DIR"
find "/opt/so/repo" -type f -not -name "$new_version.tar.gz" -exec rm -rf {} \;
}