-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·40 lines (34 loc) · 834 Bytes
/
test.sh
File metadata and controls
executable file
·40 lines (34 loc) · 834 Bytes
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
#!/usr/bin/env bash
firstline=$(head -n 1 source/changelog.md)
read -a splitfirstline <<< $firstline
version=${splitfirstline[1]}
echo "This is version: $version"
echo "$firstline"
read -p 'Do you want to continue? (y/n)' answer
answer="${answer,,}"
if [[ $answer == "y" || $answer == "yes" ]];
then
echo "ok"
else
echo "maybe lata"
exit
fi
for filename in source/*
do
echo $filename
if [[ $filename == "source/secret.txt" || $filename == "source/this is source" ]];
then
echo "Not copying" $filename
else
echo "Copying" $filename
cp $filename build/.
fi
done
(
cd build/ || exit
firstline=$(head -n 1 changelog.md)
read -a splitfirstline <<< $firstline
version=${splitfirstline[1]}
echo "your on version: $version"
ls
) # () anotate opening of a subshell so we dont have to actually leave our file and directory