Skip to content

Commit

Permalink
fix script yet again
Browse files Browse the repository at this point in the history
  • Loading branch information
NEOLabs-software committed Nov 6, 2024
1 parent d8617a2 commit 589fd1a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions scripts/mega.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#!/bin/bash

# sudo bash -c "apt update ; apt install wget ; wget https://mega.nz/linux/repo/xUbuntu_22.04/amd64/megacmd-xUbuntu_22.04_amd64.deb ; apt install ./*deb"

# Replace these with your actual MEGA account credentials
EMAIL="$4"
PASSWORD="$3"
EMAIL=$1
PASSWORD=$2

# Specify the local file or folder to upload
LOCAL_PATH="$1"
LOCAL_PATH="$4"

# Specify the remote folder to upload to
REMOTE_PATH="$2"
REMOTE_PATH="$3"

# Log in to MEGA
echo "Logging into MEGA..."
Expand All @@ -19,7 +21,8 @@ if [ $? -ne 0 ]; then
echo "Login failed. Exiting."
exit 1
fi
# apt update ; apt install wget ; wget https://mega.nz/linux/repo/xUbuntu_22.04/amd64/megacmd-xUbuntu_22.04_amd64.deb ; apt install ./*deb



# remove file from mega
echo "Removing "$REMOTE_PATH$LOCAL_PATH
Expand All @@ -32,6 +35,7 @@ mega-put "$LOCAL_PATH" "$REMOTE_PATH"
# Check if upload was successful
if [ $? -ne 0 ]; then
echo "Upload failed. Exiting."
mega-logout
exit 1
fi

Expand Down

0 comments on commit 589fd1a

Please sign in to comment.