From 9152ff3e1021e65cbb07c9b5fb61fa8293fdb8ac Mon Sep 17 00:00:00 2001 From: Michael Scalzetti Date: Fri, 25 Mar 2022 13:48:34 -0400 Subject: [PATCH] getting automove to work --- .gitignore | 2 ++ auto_move.sh | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2c85660..6a97bf3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ files/Laptop/ files/Desktop/ files/Laptop.zip files/Desktop.zip +files/Laptop.7z +files/Desktop.7z diff --git a/auto_move.sh b/auto_move.sh index 00a5319..d4bccb0 100644 --- a/auto_move.sh +++ b/auto_move.sh @@ -1,7 +1,11 @@ LOC=$1 LOCAL_USER=$2 -7z x $LOC -o./files/temp/$LOCAL_USER/ +7z x $LOC -o./files/temp/ + +mv ./files/temp/Laptop ./files/temp/$LOCAL_USER/ ||\ +mv ./files/temp/Desktop ./files/temp/$LOCAL_USER/ + cp -vR ./files/temp/$LOCAL_USER/* /home/$LOCAL_USER/