bug fix
This commit is contained in:
parent
3f5cd90b44
commit
52230660d6
2 changed files with 11 additions and 5 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
|||
sapphrc (1.3.1) unstable; urgency=medium
|
||||
|
||||
* Fixed filelist logic
|
||||
|
||||
-- Penelope Gwen <support@pogmom.me> Thu, 30 May 2024 23:07:39 -0600
|
||||
|
||||
sapphrc (1.3.0) unstable; urgency=medium
|
||||
|
||||
* codebase overhaul
|
||||
|
|
|
@ -22,10 +22,10 @@ sapphrc_addfile(){
|
|||
read -p "${bold}Add the listed files/directories to profile '${PROFILE_NAME}'?${normal} (Y/n)" yn
|
||||
if ! [[ "${yn}" =~ ^([nN][oO]|[nN])$ ]];then
|
||||
for e in ${filelist[@]};do
|
||||
if grep -q ^"${e}"$ "${sapphrc_config}/backups/${PROFILE_NAME}/${inex}";then
|
||||
if grep -q ^"${e}"$ "${sapphrc_config}/backups/${PROFILE_NAME}/${LIST}";then
|
||||
echo "already in file"
|
||||
else
|
||||
echo $e|tee -a "${sapphrc_config}/backups/${PROFILE_NAME}/${inex}" >/dev/null
|
||||
echo $e|tee -a "${sapphrc_config}/backups/${PROFILE_NAME}/${LIST}" >/dev/null
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
@ -37,7 +37,7 @@ sapphrc_rmfile(){
|
|||
rmfiles+=("$i");i=$(($i+1))
|
||||
rmfiles+=("$line")
|
||||
rmfiles+=("$line")
|
||||
done < "${sapphrc_config}/backups/${PROFILE_NAME}/${inex}"
|
||||
done < "${sapphrc_config}/backups/${PROFILE_NAME}/${LIST}"
|
||||
[ ${#rmfiles[@]} -eq 0 ] && echo "No files in list" && exit 1
|
||||
choices=($(dialog --checklist --output-fd 1 "Select options:" 0 0 0 "${rmfiles[@]}"))
|
||||
if [ $? -ne 0 ]; then
|
||||
|
@ -48,8 +48,8 @@ sapphrc_rmfile(){
|
|||
for choice in "${choices[@]}"; do
|
||||
rmlines="${rmlines}$((${choice}+1))d;"
|
||||
done
|
||||
sed -i "${rmlines}" "${sapphrc_config}/backups/${PROFILE_NAME}/${inex}"
|
||||
echo "Removed ${#choices[@]} paths from ${PROFILE_NAME} ${inex} list"
|
||||
sed -i "${rmlines}" "${sapphrc_config}/backups/${PROFILE_NAME}/${LIST}"
|
||||
echo "Removed ${#choices[@]} paths from ${PROFILE_NAME} ${LIST} list"
|
||||
}
|
||||
|
||||
sapphrc_filelists(){
|
||||
|
|
Loading…
Add table
Reference in a new issue