-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrailscommit
executable file
·44 lines (43 loc) · 992 Bytes
/
railscommit
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
#!/bin/bash
echo ""
echo "HELLO! Here's what we're going to do:"
echo " "
echo "Add the following files"
echo "-----------------------"
svn status | awk '/^\?/ {print $2}'
echo " "
echo "Remove the following files"
echo "--------------------------"
svn status | awk '/^!/ {print $2}'
echo " "
echo "Check in the following modified files"
echo "-------------------------------------"
svn status | awk '/^M/ {print $2}'
echo " "
echo "Proceed with commit? [yn]"
read answer
if [ "$answer" = "y" ]
then
echo " "
echo "Adding the following files"
svn status | awk '/^\?/ {print $2}' | xargs svn add
echo " "
echo "Removing the following files"
svn status | awk '/^!/ {print $2}' | xargs svn remove
echo " "
echo "Committing changes to repository"
svn commit
else
echo " "
echo "Commit cancelled"
fi
echo " "
echo "Want to check for updates? [yn]"
read answer
if [ "$answer" = "y" ]
then
svn update
else
echo " "
echo "Update cancelled"
fi