2021-06-28 20:54:07 +00:00
#!/bin/bash
2021-06-29 10:00:04 +00:00
# What to update before running:
# - The error message in line 43
# - The version number in line 60
2021-06-28 20:54:07 +00:00
stemFolder = " $( pwd ) / $1 "
stemFolderName = " $1 "
seriesFolder = " $( pwd ) / $1 ~series "
seriesNames = ( "focal" "groovy" "hirsute" "impish" )
2021-06-28 21:23:34 +00:00
gitFolder = "/home/nuno/Documents/core/software/fresh/bash/sid/longnowformd_package/longnow-git/"
rm -r " $stemFolder "
mkdir " $stemFolder "
2021-06-28 20:54:07 +00:00
rm -r " $seriesFolder "
mkdir " $seriesFolder "
2021-06-28 21:23:34 +00:00
cp " $gitFolder /longnow " " $stemFolder /longnow "
2021-06-28 20:54:07 +00:00
for seriesName in " ${ seriesNames [@] } " ; do
# Create corresponding folder
newSeriesFolder = " $seriesFolder / $stemFolderName ~ $seriesName "
echo " $seriesName "
cp -r " $stemFolder " " $newSeriesFolder "
cd " $newSeriesFolder "
# Make
dh_make --createorig -c mit --indep -y
wait
# Modify corresponding files
touch debian/install
echo "longnow usr/bin" > debian/install ## Add files to debian/install; depends on the files
cd debian
# Replace "unstable" for the series name ("bionic", "focal",...)
sed -i " s|unstable| $seriesName |g " changelog
2021-06-28 21:23:34 +00:00
# Meaningful update message
2021-06-29 10:00:04 +00:00
sed -i 's|Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>|Small improvement; numeric comparison and deleting the old links file to allow for manual user intervention|g' changelog
2021-06-28 20:54:07 +00:00
# Edit the control file; change "unknown" section to "utils" (or some other section)
sed -i 's|Section: unknown|Section: utils|g' control
# Cosmetic stuff
# Delete the .ex and .docs and README.Debian files
rm *.ex; rm *.docs; rm README*; rm *.EX
sed -i 's|<insert the upstream URL, if relevant>|https://github.com/NunoSempere/longNowForMd|g' control
sed -i 's|Nuno <nuno@unknown>|Nuno Sempere <nuno.semperelh@gmail.com>|g' *
# Build
cd ..
debuild -S
wait
cd ..
2021-06-29 10:00:04 +00:00
dput ppa:nunosempere/longnowformd longnow_0.8~$seriesName -1_source.changes
2021-06-28 20:54:07 +00:00
wait
done
2021-06-29 10:00:04 +00:00
## How to use: ./createSeries.sh longnow-0.8
2021-06-28 21:23:34 +00:00
2021-06-29 10:00:04 +00:00
cp -r " $stemFolder " " $gitFolder /debian/ $stemFolderName "
cp -r " $seriesFolder " " $gitFolder /debian/ $stemFolderName ~series "