Skip to content

Commit

Permalink
new version 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderShad committed Sep 23, 2024
1 parent 2f02f6a commit f63de26
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@

Spec для сборки в пакет приложен

Для установки на ALT Linux без пакета, перейдите в раздел Releases
Для установки на ALT Linux без пакета, либо с неофициального пакета, перейдите в раздел Releases
47 changes: 36 additions & 11 deletions msgextract.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,46 @@
#!/bin/bash
# Easily extract the contents of MSG email files v.0.2
# https://github.com/AlexanderShad/msgextract

echo -e '\033[44m --- Start extraction...--- \033[0m\n'
echo -e '\e[042;30m --- Start extraction... --- \033[0m\n'

if [ -n "$1" ] ; then

cp "$(cd "$(dirname "$1")"; pwd -P)/$(basename "$1")" "$(cd "$(dirname "$1")"; pwd -P)/tfile.msg"

msgconvert "$(cd "$(dirname "$1")"; pwd -P)/tfile.msg"
munpack "$(cd "$(dirname "$1")"; pwd -P)/tfile.eml"

rm "$(cd "$(dirname "$1")"; pwd -P)/tfile.eml"
rm "$(cd "$(dirname "$1")"; pwd -P)/tfile.msg"
if [ -e "$(cd "$(dirname "$1")"; pwd -P)/$(basename "$1")" ] ; then

echo ''
echo -e '\e[0;31m* creating temp file...\e[0m'
echo ''

cp "$(cd "$(dirname "$1")"; pwd -P)/$(basename "$1")" "$(cd "$(dirname "$1")"; pwd -P)/tfile.msg"

echo ''
echo -e '\e[0;31m* msgconverting...\e[0m'
echo ''

msgconvert "$(cd "$(dirname "$1")"; pwd -P)/tfile.msg"

echo ''
echo -e '\e[0;31m* munpacking...\e[0m'
echo ''
munpack "$(cd "$(dirname "$1")"; pwd -P)/tfile.eml"

echo ''
echo -e '\e[0;31m* deleting temp files...\e[0m'
echo ''
rm "$(cd "$(dirname "$1")"; pwd -P)/tfile.eml"
rm "$(cd "$(dirname "$1")"; pwd -P)/tfile.msg"

echo -e '\e[042;30m --- Extracted --- \033[0m\n'

else
echo -e '\e[042;30m --- File not found. --- \033[0m\n'
fi

else

echo -e '\033[44m --- Extracted--- \033[0m\n'
echo -e '\e[042;30m --- No parameters found. --- \033[0m\n'

else
echo -e '\033[44m --- No parameters found. --- \033[0m\n'
fi


Expand Down
4 changes: 2 additions & 2 deletions msgextract.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: msgextract
Version: 0.1
Version: 0.2
Release: alt1

Summary: Easily extract the contents of MSG email files
Expand Down Expand Up @@ -28,5 +28,5 @@ install -Dm755 %_builddir/%name-%version/%name.sh %buildroot%_bindir/%name
%_bindir/%name

%changelog
* Sat Jul 06 2024 Aleksandr Shamaraev <mr.shad@> 0.1-alt1
* Sun Sep 23 2024 Aleksandr Shamaraev <mr.shad@> 0.2-alt1
- first build

0 comments on commit f63de26

Please sign in to comment.