-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·58 lines (43 loc) · 1.44 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·58 lines (43 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e # Exit on any error
# Colors
GREEN='\033[0;32m'
RED='\033[0;31m'
BLUE='\033[0;34m'
NC='\033[0m'
print_status() {
echo -e "${BLUE}[INFO]${NC} $1"
}
print_success() {
echo -e "${GREEN}[SUCCESS]${NC} $1"
}
print_error() {
echo -e "${RED}[ERROR]${NC} $1"
}
# Paths
SOURCE_DIR="/scratch/users/rocm-ls/demo"
DEST_DIR="$(pwd)/"
print_status "Source: $SOURCE_DIR"
print_status "Destination: $DEST_DIR"
# Check source exists
if [ ! -d "$SOURCE_DIR" ]; then
print_error "Source directory not found: $SOURCE_DIR"
exit 1
fi
print_status "using cp..."
sudo cp -r "$SOURCE_DIR" "$DEST_DIR/"
print_success "Demo folder copied to $DEST_DIR"
# Show summary
file_count=$(find "$DEST_DIR" -type f | wc -l)
total_size=$(du -sh "$DEST_DIR" 2>/dev/null | cut -f1 || echo "unknown")
print_status "Copied files: $file_count, Size: $total_size"